StrClear

From the Oblivion ConstructionSet Wiki
Revision as of 06:23, 22 December 2007 by imported>Tibixe (new function)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Syntax:

StrClean strToClean:stringID

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


StrClean should not be confused with StrDelete. For example,

set str to StrNew "Hello"
StrClean 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.