| Blockland Forums > Modification Help |
| strStr, strPos, strLen help |
| (1/1) |
| FFSO:
I need to learn more about the strStr, strPos, and strLen before I continue coding in the future. Can someone type up a descriptive post all about the str stuff and how you would use them in scripts. |
| Greek2me:
This is one of the best string manipulation resources: http://docs.garagegames.com/tge/official/content/documentation/Reference/Console%20Functions/TorqueScript_Console_Functions_3.html |
| Ipquarx:
strStr and strPos are practically the same thing. They both find the location of a string inside of another string. Example: strStr("Hello", "he"); will return 0, which is the position of the first charachter of the string. strPos will return the same thing. Arguments: strStr(string, string to find inside of string); strPos(string, string to find inside of string); StrLen gets the length of a string. Example: strLen("Hello"); will return 5, which is the number of charachters in the string. Arguments: strLen(string); |
| FFSO:
That's very helpful, thanks. |
| Navigation |
| Message Index |