Anonymous user
StringPlus: Difference between revisions
Jump to navigation
Jump to search
no edit summary
*>Monkey 05 06 No edit summary |
*>Monkey 05 06 No edit summary |
||
Line 23: | Line 23: | ||
Returns a specially formatted String containing the char '''C'''. '''PADTO''' allows you to pad the String to a specific length. '''ZEROPAD''' controls whether the padding is filled with zeroes (otherwise it is filled with whitespace). | Returns a specially formatted String containing the char '''C'''. '''PADTO''' allows you to pad the String to a specific length. '''ZEROPAD''' controls whether the padding is filled with zeroes (otherwise it is filled with whitespace). | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String cstr = StringFromChar('A'); | String cstr = StringFromChar('A'); | ||
Line 44: | Line 44: | ||
Returns a String formatted from float '''F'''. '''PRECISION''' sets the number of digits after the decimal. '''PADTO''' allows you to pad the String to a specific length. '''ZEROPAD''' controls whether the padding is zero-filled, otherwise it is space-filled. | Returns a String formatted from float '''F'''. '''PRECISION''' sets the number of digits after the decimal. '''PADTO''' allows you to pad the String to a specific length. '''ZEROPAD''' controls whether the padding is zero-filled, otherwise it is space-filled. | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String fstr = StringFromFloat(3.14); | String fstr = StringFromFloat(3.14); | ||
Line 69: | Line 69: | ||
Returns a String formatted from int '''I'''. '''PADTO''' allows you to pad the String to a specific length. '''ZEROPAD''' controls whether the padding is zero-filled, otherwise it is space-filled. | Returns a String formatted from int '''I'''. '''PADTO''' allows you to pad the String to a specific length. '''ZEROPAD''' controls whether the padding is zero-filled, otherwise it is space-filled. | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String istr = StringFromInt(27); | String istr = StringFromInt(27); | ||
Line 90: | Line 90: | ||
Returns a String filled with each item from '''ARRAY''' in order. '''GLUE''' is inserted between each item to make it stick together of course! | Returns a String filled with each item from '''ARRAY''' in order. '''GLUE''' is inserted between each item to make it stick together of course! | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String sarr[] = new String[4]; | String sarr[] = new String[4]; | ||
Line 108: | Line 108: | ||
Returns a String-array containing elements of the String which when displayed in '''FONT''' are no more than '''WIDTH''' pixels wide. '''DELIMITERS''' allows you to specify a set of characters that each segment should end with. '''CASESENSITIVE''' defaults to ''FALSE''. The returned array has the first element formatted to contain the size of the rest of the array. For an array containing 5 elements, the first index (''array[0]'') would contain the text "5". This means that valid indices for the array are from ''0'' to (''array[0].AsInt + 1''). | Returns a String-array containing elements of the String which when displayed in '''FONT''' are no more than '''WIDTH''' pixels wide. '''DELIMITERS''' allows you to specify a set of characters that each segment should end with. '''CASESENSITIVE''' defaults to ''FALSE''. The returned array has the first element formatted to contain the size of the rest of the array. For an array containing 5 elements, the first index (''array[0]'') would contain the text "5". This means that valid indices for the array are from ''0'' to (''array[0].AsInt + 1''). | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String str = "This is a long string we're going to split into other segments."; | String str = "This is a long string we're going to split into other segments."; | ||
Line 127: | Line 127: | ||
Returns a String-array containing elements of the String. The String will be divided by instances of '''OTHERSTRING'''. The '''OTHERSTRING''' will not be included in any of the array elements. '''CASESENSITIVE''' is ''FALSE'' by default. For the formatting and size of the array, see {{link||String.SplitByWidth}}. | Returns a String-array containing elements of the String. The String will be divided by instances of '''OTHERSTRING'''. The '''OTHERSTRING''' will not be included in any of the array elements. '''CASESENSITIVE''' is ''FALSE'' by default. For the formatting and size of the array, see {{link||String.SplitByWidth}}. | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String str = "This is some text."; | String str = "This is some text."; | ||
Line 146: | Line 146: | ||
Returns a String-array containing elements of the String. The String will be divided by any instance of the characters in '''CHARACTERSET''', which will not be included in the array elements. '''CASESENSITIVE''' is ''FALSE'' by default. For the formatting and size of the array, see {{link||String.SplitByWidth}}. | Returns a String-array containing elements of the String. The String will be divided by any instance of the characters in '''CHARACTERSET''', which will not be included in the array elements. '''CASESENSITIVE''' is ''FALSE'' by default. For the formatting and size of the array, see {{link||String.SplitByWidth}}. | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String str = "Hello, my name is Ego. What is your name?"; | String str = "Hello, my name is Ego. What is your name?"; | ||
Line 165: | Line 165: | ||
Returns how many characters in the String are within the '''CHARACTERSET'''. '''CASESENSITIVE''' is ''FALSE'' by default. | Returns how many characters in the String are within the '''CHARACTERSET'''. '''CASESENSITIVE''' is ''FALSE'' by default. | ||
{{textcolor|FF0000|Example:}} | {{textcolor|#FF0000|Example:}} | ||
String str = "This is some text."; | String str = "This is some text."; |