The following are the Text and String functions you can use in COD scripts. In most cases, the syntax can be copied/pasted directly into a file and function properly. They should be edited for your particular use. This allows you to short cut your time by not having to experiment to figure out code syntax.

FunctionExampleReturn Value
ascasc("A")65
asciiascii(65)"A"
chrchr("Autodesk", 5)"d"
getfileextgetfileext("c:\(temp)\test.txt")
getfileext("c:/(temp)/test.txt")
getfileext("c:/(temp)/test.txt")
".txt"
getfilenamegetfilename("c:\\(temp)\test.txt")
getfilename("c:/(temp)/test.txt")
"test.txt"
getfilepathgetfilepath("c:\(temp)\test.txt")
getfilepath("c:/(temp)/test.txt")
"c:/(temp)/ "
instrinstr(1, "Autodesk", "D”, False)
instr(1, "Autodesk", "D”, True)
instr(6, "Autodesk", "D”, False)
5
0
0
leftleft("Autodesk", 4)"Auto"
lenlen("Autodesk")8
lowerlower("Autodesk")"autodesk"
ltrimltrim(" Autodesk ")"autodesk "
midmid("Autodesk", 5, 2)"de"
rightright("Autodesk", 4)"desk"
rtrimrtrim(" Autodesk ")" autodesk"
substringsubstring("Autodesk", 3, 4)
substring("Autodesk", 2, 7)
"to"
"utodes"
trimtrim(" Autodesk ")"autodesk"
upperupper("Autodesk")"AUTODESK"
wildcardwildcard("Autodesk", "*desk")
wildcard("Autodesk", "*chair")
wildcard("Autodesk", "?ut?d*")
1
0
1