strings method

BlitzMax Forums/BlitzMax Beginners Area/strings method

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The Replace method returns a new string.
Strict
Local str:String="***** Hello *****"

Print

str.replace("*","=")
Print str

str = str.replace("*","=")
Print str
It's not easy to find this in the documentation. Look in the Language reference, Strings section. There is a list of string methods, including this one:

Replace:String( subString:String,withString:String )

The Replace:String tells you that Replace returns a String value.