02.05.2013 Views

Description - Mks.com

Description - Mks.com

Description - Mks.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

substr(expression, position)<br />

returns the substring of the first string, starting at the position given by the second argument<br />

(an integer expression). Strings are 1-origin; however, for convenience, if the value of<br />

position is 0, substr returns the substring beginning at 1. If position is negative, it is taken<br />

to be an offset from the end of the string. For example:<br />

substr("hello",0) = substr("hello",1) -> "hello"<br />

substr("hello",length("hello")) -> "o"<br />

substr("hello",-3) -> "llo"<br />

substr("hello",-1) -> "o"<br />

substr may also take three arguments, as in:<br />

substr(expression, position, length)<br />

The length argument is an integer expression, giving the desired number of characters in<br />

the substring. If this value is negative, the substring is obtained by advancing to the<br />

indicated position, marking that the end, and then retreating by the specified amount. For<br />

example:<br />

substr("hello",0,1) = substr("hello",1,1) -> "h"<br />

substr("hello",-1,-3) -> "llo"<br />

tail(indexable_object)<br />

returns the unread portion of an indexable_object.<br />

tempfile([dir_str], pre)<br />

returns a string guaranteed to be an unused temporary file name in the directory specified<br />

by dir_str. If no dir_str is provided, then the directory specified by TMPDIR is used; if<br />

TMPDIR is not set, the system default is used (usually /tmp. If pre is not an empty string, it<br />

is taken as a prefix for the name of the temporary file.<br />

tolower(expression)<br />

returns the string expression with all uppercase characters translated to lowercase.<br />

toupper(expression)<br />

does the opposite translation.<br />

AVAILABILITY<br />

MKS Toolkit for Developers<br />

MKS Toolkit for Interoperability<br />

MKS Toolkit for Professional Developers<br />

323 of 457

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

Saved successfully!

Ooh no, something went wrong!