StrClear

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Syntax:

StrClear strToClear:stringID

Deletes the contents of the string associated with the strToClear, but does not delete the string itself. It is equivalent to StrSet strToClear ""


StrClear should not be confused with StrDelete. For example,

set str to StrNew "Hello"
StrClear str
StrSet str "Hello"
StrPrint str

This is valid code; It will print "Hello" to the console, as expected.


set str to StrNew "Hello"
StrDelete str
StrSet str "Hello"
StrPrint str

This is not valid code; While this will also seem to work at a basic level, it could break higher level commands.