13.07.2015 Views

TASKING Script Debugger User Guide

TASKING Script Debugger User Guide

TASKING Script Debugger User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Debugger</strong> <strong>Script</strong> LanguageFunction$replace(string, pattern,replacement [, all [, start [, end]]])$rreplace(string, pattern,replacement [, start [, end]])$at(string, number)$set_at(string, index, char)$separate(string, patterninclude_pattern [, return_assoc] ])DescriptionReturns a copy of string in which the first (if all is absent or equalto 0) or all occurrences of regular expression pattern has / havebeen replaced by the string replacement. The search can berestricted to a part of string via the optional index arguments start(inclusive) and end (exclusive).As $replace(…), but the search is performed from right to left.Returns a string of length 1 that contains the character at zero-basedindex number of the string. For example, $at("abcdef", 2)returns "c".Replaces the character at the specified zero-based index by char,which must be a string of length 1. Note that this function operatesdirectly on string; it does not return a value.Partitions string using the regular expression separator pattern,returning an indexed array of strings. If the optional argumentinclude_pattern is equal to 1, the separator characters are includedin the strings in the output arrays.If the optional argument return_assoc is equal to 1, the result is anassociative array.Examples:$indxd =ref $separate("abc#def", "#");// Returns ["abc", "def"].$indxd =ref $separate("abc#def", "#", 1);// Returns ["abc#", "def"].$assoc =ref $separate("abc#def", "#", 0, 1);// Returns {"abc" : "abc", "def" : "def"}.$upper(string)$lower(string)$strip(string)$lstrip(string)$rstrip(string)$strip1(string)Returns a copy of string in which all lowercase / uppercasecharacters have been substituted by the corresponding uppercase/ lowercase characters.$strip(string) returns a copy of string from which all leadingand trailing whitespace characters have been removed.The variants $lstrip(…) and $rstrip(…) only remove leadingand trailing whitespace, respectively.Returns a copy of string in which all sequences of multipleconsecutive whitespace characters have been reduced to a singlewhitespace character.33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!