Difference between revisions of "ObjectType:mutablestring"
Jump to navigation
Jump to search
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
== Description == | == Description == | ||
− | A string, also known as <tt>text</tt> is a series of consecutive characters. | + | {{ObjectType-Vitals|mutablestring|[[LavishScript]]|[[ObjectType:string|string]]|the stored text|[[ObjectType:mutablestring|mutablestring]]|no|utf8string *}} |
+ | A string, also known as <tt>text</tt> is a series of consecutive characters. Mutable indicates that the string may be modified. | ||
== Members == | == Members == | ||
− | '' | + | *[[ObjectType:string|string]] String: Retrieves the appropriate '''string''' object from this mutablestring |
== Methods == | == Methods == | ||
− | *Set[text]: Sets the value of the string to this new text | + | *'''Set['''text''']''': Sets the value of the string to this new text |
− | *Concat[text]: Concatenates the string with this new text | + | *'''Concat['''text''']''': Concatenates the string with this new text |
− | *ToUpper: Converts the string to upper case | + | *'''ToUpper''': Converts the string to upper case |
− | *ToLower: Converts the string to lower case | + | *'''ToLower''': Converts the string to lower case |
− | |||
− | |||
− | |||
== Declaring string Variables == | == Declaring string Variables == | ||
+ | *Any string '''variable''' is a '''mutablestring''' | ||
+ | *declare Food string "Pizza" | ||
+ | *declare Word string script | ||
== Setting string Variables == | == Setting string Variables == | ||
+ | *string1:Set[This is string 1] | ||
+ | *string2:Set[${string3}] | ||
== Comparing Strings == | == Comparing Strings == | ||
+ | declare name1 string "fred" | ||
+ | declare name2 string "george" | ||
+ | if ${name1.Equal[${name2}]} | ||
+ | { | ||
+ | echo We're both named fred! | ||
+ | } | ||
== See Also == | == See Also == | ||
− | + | {{LavishScript:ObjectType}} |
Latest revision as of 15:08, 8 July 2018
Contents
Description
mutablestring | |
Defined By | LavishScript |
Inherits | string |
Reduces To | the stored text |
Variable Object Type | mutablestring |
Uses Sub-Types | no |
C/C++ Type | utf8string * |
A string, also known as text is a series of consecutive characters. Mutable indicates that the string may be modified.
Members
- string String: Retrieves the appropriate string object from this mutablestring
Methods
- Set[text]: Sets the value of the string to this new text
- Concat[text]: Concatenates the string with this new text
- ToUpper: Converts the string to upper case
- ToLower: Converts the string to lower case
Declaring string Variables
- Any string variable is a mutablestring
- declare Food string "Pizza"
- declare Word string script
Setting string Variables
- string1:Set[This is string 1]
- string2:Set[${string3}]
Comparing Strings
declare name1 string "fred" declare name2 string "george" if ${name1.Equal[${name2}]} { echo We're both named fred! }
See Also
LavishScript Object Types
- Text
- string - mutablestring - unistring
- Numbers
- byte - float - float64 - int - uint - int64
- Boolean (TRUE/FALSE)
- bool
- Pointers
- boolptr - byteptr - floatptr - float64ptr - intptr - uintptr - int64ptr - rgbptr - stringptr
- Containers
- objectcontainer - array - index - collection - queue - stack - set - variablescope
- JSON
- jsonobject - jsonarray - jsonvaluecontainer - jsonvalue
- Iteration
- iterator - jsoniterator
- Date/Time
- time
- File Handling
- filepath - file - filelist - filelistentry
- Tasks
- lavishmachine - Accessed via the Top-Level Object LMAC
- task - tasklibrary - taskmanager - tasktype - taskpulseargs - elmactaskstate