mobmili.blogg.se

Purebasic left
Purebasic left




Useful for converting strings to lists for example. StringField can be used to obtain an indexed substring from a target string. Debug StringByteLength(String1, #PB_Unicode) Debug StringByteLength(String1, #PB_Ascii) StringByteLength returns the length of a string in bytes in the specified format, or the current default if one is not specified (excluding the terminating null). String2 = ReplaceString(String1, "lazy", "sleeping") Shows The quick brown fox jumps over the sleeping dog. ReplaceString can be used to change the occurrence of a substring within another string. String2 = RemoveString(String1, " brown") Shows The quick fox jumps over the lazy dog. RemoveString can be used to remove one string from within another. FindString can be used to find the location of one string within another. However the LCase (and UCase) functions can be used to switch a string to all lower (or upper) case Shows 2 Debug "* CountString and LCase" CountString returns the number of instances of the second string in the first string, it is case sensitive. Shows "The brown dog." Debug "* Left, Mid and Right"

purebasic left

Space returns the specified number of space characters as a string. Right returns a number of characters from the right hand end of a string. Mid returns a number of characters from the given start location in the middle of a string.

purebasic left

Left returns a number of characters from the left hand end of a string. String1 = "The quick brown fox jumps over the lazy dog." Library - their purpose and their correct use. The following example shows step by step the different commands of the string






Purebasic left