Difference between revisions of "TRIGEDIT-VARIABLES-TEXTS TEXT-VAR ARG .CDR .CAR ARG.CDR CMD.CDR ARG.CAR CMD.CAR TEXT PUSH CMD CMD CDR CAR TRIM TRIGEDIT-TEXT-VAR STRLEN"
(Bot: Automated import of articles) |
m |
||
Line 1: | Line 1: | ||
'''TRIGEDIT-VARIABLES-TEXTS TEXT-VAR ARG .CDR .CAR ARG.CDR CMD.CDR ARG.CAR CMD.CAR TEXT PUSH CMD CMD CDR CAR TRIM TRIGEDIT-TEXT-VAR STRLEN''' | '''TRIGEDIT-VARIABLES-TEXTS TEXT-VAR ARG .CDR .CAR ARG.CDR CMD.CDR ARG.CAR CMD.CAR TEXT PUSH CMD CMD CDR CAR TRIM TRIGEDIT-TEXT-VAR STRLEN''' | ||
[[Category:Help Files]] | [[Category:Help Files]] | ||
− | + | [[Category:Building]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Text Variable Fields | Text Variable Fields |
Latest revision as of 14:30, 14 July 2017
TRIGEDIT-VARIABLES-TEXTS TEXT-VAR ARG .CDR .CAR ARG.CDR CMD.CDR ARG.CAR CMD.CAR TEXT PUSH CMD CMD CDR CAR TRIM TRIGEDIT-TEXT-VAR STRLEN
Text Variable Fields
These fields pertain to any variable that contains a string of text. These
are often the variables, such as %speech%, which are provided to a script, but
can also be variables that have been created by the script, such as
%room.north%
When using field - The variable returns
strlen - Returns the number of characters in the string.
trim - Returns the string without any leading or trailing whitespace.
This is used to trim extra spaces from the beginning or end of a
string.
car - Returns the first word of the string. For %text%="this is the
string"; %text.car% will yield "this". {cRTSTAT 53{c0
cdr - Returns all but the first word of the string, trimmed. For %text%=
"this is the string"; %text.cdr% will yield "is the string".
contains() - Subfield used for comparison.
mudcommand - Returns the mud command the string is shorthand for. Used to make
sure the command you react to is the one you want: For %text%="o"
%text.mudcommand% will yield "open". {cRHELP MUDCOMMAND{c0
Example: {cRTSTAT 30{c0