String_setValue

Homepage
Wrappers

Sets the value stored in the String object.

String_setValue(StringObject, value = "")

Parameters

StringObject The String object to use for the current operation.
value The value to store in the String object.

Return Value

The previous value stored in StringObject.

Remarks

If StringObject is NULL (0 or blank), the empty string is returned, to indicate an error.

Related

String_getValue

String

Examples

;Creates a new String initialized to "Hello"
myString := String_new("Hello")

;Sets myString to "Goodbye" (and returns the old value)
oldValue := String_setValue(myString, "Goodbye")

;Outputs oldValue and the value stored in myString
MsgBox, % "The previous value for myString was: " oldValue . "`n"
        . "The current value for myString is: " String_getValue(myString)

Homepage  |  Wrappers