String functions¶
zDExt_Str_Upper¶
Gets string with uppercase.
str– string to formatreturn– formatted string
zDExt_Str_Lower¶
Gets string with lowercase.
str– string to formatreturn– formatted string
zDExt_Str_Capital¶
Returns a string with the first character uppercase and the remaining characters lowercase.
str– string to formatreturn– formatted string
zDExt_Str_StartsWith¶
Checks whether a string starts with a given prefix (case-insensitive).
str– string to checkprefix– the prefix to compare againstreturn–TRUEif the string starts with the given prefix, otherwise returnsFALSE
zDExt_Str_EndsWith¶
Checks whether a string ends with a given suffix (case-insensitive).
str– string to checksuffix– the suffix to compare againstreturn–TRUEif the string ends with the given suffix, otherwise returnsFALSE
zDExt_Str_Cut¶
Returns a copy of the string with length characters removed starting at the zero-based startIndex.
str– string to cutstartIndex– the starting indexlength– number of characters to removereturn– string after removing the specified range
zDExt_Str_Length¶
Returns the length of the string.
str– string to measurereturn– number of characters in the engine string
zDExt_Str_Put¶
Returns a copy of the string with value inserted at the zero-based index.
str– original stringvalue– text to insertindex– insertion positionreturn– string containing the inserted text
| Example usage | |
|---|---|
zDExt_Str_Format¶
Formats text using a variable number of arguments. It is available in both the content and menu parsers.
Supported placeholders are %s (string), %i (integer), %f (float), and %b (integer rendered as True or False). Supply the values in placeholder order, followed by the format string as the final argument. The implementation reads the format string first from the script stack and then processes placeholders from right to left.
| Example usage | |
|---|---|
Each placeholder requires a value of the corresponding type. Use a nonempty format string with the current implementation.