A.7. Miscellaneous Functions

FeatureDescriptionUtility Function
String operationsCheck if the string contains another string(tgapi-util-string-contains? "string1*" "string2*")
Enables you to split a string by the specified character.(tgapi-util-string-split "original-string" "split-character")
Enables you to split a string by the specified string.(tgapi-util-string-split-with-string "original-string" "split-string")
Enables you to replace a part (old-sub-string) of a target-string by the specified string (new-sub-string).(tgapi-util-string-replace "target-string" "old-sub-string" "new-sub-string")

For example: (tgapi-util-string-replace "tst-string" "tst" "test") will return "test-string".

Folder/directory ManagementReturns the path for the working directory(tgapi-util-get-mesher-working-directory)
Sync the Cortex current working directory with the Fluent current working directory (directory)(tgapi-util-sync-directories directory)
File managementFinds the file in the working directory based on the filename and file-suffix specified.(tgapi-util-find-file-with-suffix "filename" "file-suffix")
(tgapi-util-find-file-pattern-with-suffix "filename" "file-suffix")
Returns the last read file(tgapi-util-get-last-read-file-name)
Returns the file suffix for the last read file(tgapi-util-get-last-read-file-suffix)