| ECMAScript | |
|---|---|
| String | fromCharCode ( Number charCode1, … ) | 
| ECMAScript | |
|---|---|
| String | charAt ( Number pos ) | 
| Number | charCodeAt ( Number pos ) | 
| String | concat ( String string1, … ) | 
| Number | indexOf ( String pattern, Number startPos=0 ) | 
| Number | indexOf ( RegExp pattern, Number startPos=0 ) | 
| Number | lastIndexOf ( RegExp pattern, Number startPos=length-1 ) | 
| Number | lastIndexOf ( String pattern, Number startPos=length-1 ) | 
| Number | localeCompare ( String that ) | 
| Array | match ( RegExp pattern ) | 
| String | replace ( String pattern, Function callbackfn ) | 
| String | replace ( RegExp pattern, String newValue ) | 
| String | replace ( RegExp pattern, Function callbackfn ) | 
| String | replace ( String pattern, String newValue ) | 
| Number | search ( String pattern ) | 
| Number | search ( RegExp pattern ) | 
| String | slice ( Number start, Number end ) | 
| Array | split ( RegExp separator, Number limit ) | 
| Array | split ( String separator ) | 
| Array | split ( String pattern ) | 
| Array | split ( RegExp pattern ) | 
| Array | split ( String separator, Number limit ) | 
| String | substring ( Number start, Number end=length ) | 
| String | toLocaleLowerCase () | 
| String | toLocaleUpperCase () | 
| String | toLowerCase () | 
| String | toString () | 
| String | toUpperCase () | 
| String | trim () | 
| String | valueOf () | 
| DAZ Script | |
| String | arg ( String value, Number fieldWidth=0 ) | 
| String | arg ( Number value, Number fieldWidth=0 ) | 
| String | argDec ( Number value, Number fieldWidth=0, Number format='g', Number precision ) | 
| String | argInt ( Number value, Number fieldWidth=0, Number base=10 ) | 
| Boolean | endsWith ( String pattern ) | 
| Boolean | endsWith ( RegExp pattern ) | 
| Number | find ( RegExp pattern, Number startPos=0 ) | 
| Number | find ( String pattern, Number startPos=0 ) | 
| Number | findRev ( RegExp pattern, Number startPos=length-1 ) | 
| Number | findRev ( String pattern, Number startPos=length-1 ) | 
| Boolean | isEmpty () | 
| String | left ( Number num ) | 
| String | lower () | 
| String | mid ( Number startIndex, Number num ) | 
| String | right ( Number num ) | 
| Number | searchRev ( RegExp pattern ) | 
| Number | searchRev ( String pattern ) | 
| Boolean | startsWith ( RegExp pattern ) | 
| Boolean | startsWith ( String pattern ) | 
| String | upper () | 
This is the script counterpart to the QString type used in the C++ SDK.
A string is a sequence of zero or more Unicode characters. All string indexes are zero-based, which means the index for the last character in the string sText is always sText.length - 1.
Example:
Strings creation and concatenation
var str1 = "foo"; var str2 = new String( "foo" ); var str3 = str1 + " " + str2; var str4 = String( "%1%2" ).arg( "foo" ).arg( "bar" );
See Also:
String : fromCharCode( Number charCode1, … )
Parameter(s):
Return Value:
Example:
print( String.fromCharCode( 72, 69, 76, 76, 79 ) ); //HELLO
String()
Default constructor.
String( String text )
Parameter(s):
Parameter(s):
Return Value:
pos . If pos is out of bounds, undefined is returned.Number : charCodeAt( Number pos )
Parameter(s):
Return Value:
pos . If pos is out of bounds, undefined is returned.String : concat( String string1, … )
Parameter(s):
Return Value:
Number : indexOf( String pattern, Number startPos=0 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the beginning of the string. If the pattern is not found in the string, -1 is returned.Number : indexOf( RegExp pattern, Number startPos=0 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the beginning of the string. If the pattern is not found in the string, -1 is returned.Number : lastIndexOf( RegExp pattern, Number startPos=length-1 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the end of the string. If the pattern is not found in the string, -1 is returned.Number : lastIndexOf( String pattern, Number startPos=length-1 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the end of the string. If the pattern is not found in the string, -1 is returned.Number : localeCompare( String that )
Performs a locale-sensitive comparison of the given string with this string.
Parameter(s):
Return Value:
Array : match( RegExp pattern )
Parameter(s):
Return Value:
pattern in the string. If the pattern is not found in the string, undefined is returned.String : replace( String pattern, Function callbackfn )
Parameter(s):
Return Value:
callbackfn for the first occurrence of a matched substring has bee replaced with the corresponding return value.String : replace( RegExp pattern, String newValue )
Parameter(s):
Return Value:
pattern has been replaced with newValue.String : replace( RegExp pattern, Function callbackfn )
Parameter(s):
Return Value:
callbackfn for each matched substring has been replaced with the corresponding return value.String : replace( String pattern, String newValue )
Parameter(s):
Return Value:
pattern has been replaced with newValue.Number : search( String pattern )
Parameter(s):
Return Value:
pattern in the string, starting at the beginning of the string. If the pattern is not found in the string, -1 is returned.Number : search( RegExp pattern )
Parameter(s):
Return Value:
pattern in the string, starting at the beginning of the string. If the pattern is not found in the string, -1 is returned.String : slice( Number start, Number end )
Creates a substring from this string, starting with the character at index start, and going to, but not including the character at index end.
Parameter(s):
Return Value:
Array : split( RegExp separator, Number limit )
Splits this string into an array of substrings at each occurrence of separator.
Parameter(s):
limit entries.Return Value:
Array : split( String separator )
Splits this string into an array of substrings at each occurrence of separator.
Parameter(s):
Return Value:
Array : split( String pattern )
Parameter(s):
Return Value:
pattern.Array : split( RegExp pattern )
Parameter(s):
Return Value:
pattern.Array : split( String separator, Number limit )
Splits this string into an array of substrings at each occurrence of separator.
Parameter(s):
limit entries.Return Value:
String : substring( Number start, Number end=length )
Parameter(s):
Return Value:
start, up to but not including end.See Also:
String : toLocaleLowerCase()
Provides a locale-aware version of toLowerCase().
Return Value:
String : toLocaleUpperCase()
Provides a locale-aware version of toUpperCase().
Return Value:
String : toLowerCase()
Return Value:
See Also:
String : toString()
Return Value:
String : toUpperCase()
Return Value:
See Also:
String : trim()
Return Value:
String : valueOf()
Return Value:
String : arg( String value, Number fieldWidth=0 )
Parameter(s):
value is padded to. A positive fieldWidth will produce right aligned text, a negative fieldWidth will produce left aligned text.Return Value:
value.String : arg( Number value, Number fieldWidth=0 )
Parameter(s):
value is padded to. A positive fieldWidth will produce right aligned text, a negative fieldWidth will produce left aligned text.Return Value:
value.String : argDec( Number value, Number fieldWidth=0, Number format='g', Number precision )
Specialized for cases where value is a decimal.
Parameter(s):
value is padded to. A positive fieldWidth will produce right aligned text, a negative fieldWidth will produce left aligned text.Return Value:
value.Example:
var fValue = Math.PI; var sValue = String( "%1" ).argDec( fValue, 0, 'f', 5 ); MessageBox.information( String( "Variable : sValue\nType : %1\nValue : %2" ) .arg( typeof sValue ).arg( sValue ), "String.argDec(...)", "&OK" );
String : argInt( Number value, Number fieldWidth=0, Number base=10 )
Specialized for cases where value is an integer.
Parameter(s):
value is padded to. A positive fieldWidth will produce right aligned text, a negative fieldWidth will produce left aligned text.Return Value:
value.Example:
var nValue = 32; var sValue = String( "%1" ).argInt( nValue, 0, 10 ); MessageBox.information( String( "Variable : sValue\nType : %1\nValue : %2" ) .arg( typeof sValue ).arg( sValue ), "String.argInt(...)", "&OK" );
Boolean : endsWith( String pattern )
Parameter(s):
Return Value:
true if the string ends with pattern, otherwise false.Boolean : endsWith( RegExp pattern )
Parameter(s):
Return Value:
true if the string ends with pattern, otherwise false.Number : find( RegExp pattern, Number startPos=0 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the beginning of the string. If the pattern is not found in the string, -1 is returned.Number : find( String pattern, Number startPos=0 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the beginning of the string. If the pattern is not found in the string, -1 is returned.Number : findRev( RegExp pattern, Number startPos=length-1 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the end of the string. If the pattern is not found in the string, -1 is returned.Number : findRev( String pattern, Number startPos=length-1 )
Parameter(s):
Return Value:
pattern in the string, starting at position startPos. If startPos is not specified, the function starts at the end of the string. If the pattern is not found in the string, -1 is returned.Return Value:
true if the string is empty (has a length of 0), otherwise false.Parameter(s):
Return Value:
num leftmost characters.String : lower()
Return Value:
See Also:
String : mid( Number startIndex, Number num )
Parameter(s):
Return Value:
startIndex including num characters.See Also:
Parameter(s):
Return Value:
num rightmost characters.Number : searchRev( RegExp pattern )
Parameter(s):
Return Value:
pattern in the string, starting at the end of the string. If the pattern is not found in the string, -1 is returned.Number : searchRev( String pattern )
Parameter(s):
Return Value:
pattern in the string, starting at the end of the string. If the pattern is not found in the string, -1 is returned.Boolean : startsWith( RegExp pattern )
Parameter(s):
Return Value:
true if the string starts with pattern, otherwise false.Boolean : startsWith( String pattern )
Parameter(s):
Return Value:
true if the string starts with pattern, otherwise false.String : upper()
Return Value:
See Also: