substr(data,start[,length])

Tinderbox Icon


Operator Type:   Function
Operator Scope of Action:   Item
Operator Purpose:   Data manipulation

substr("data",start,[length])

Where "data" is a string literal, string attribute or expression evaluating to a string.

Where start is the zero-based position to start the substring. Negative start values are not supported, though String.substring() does so and may be used instead.

Where length is the length of the returned string. If not specified, the entire string from (or back from) start is returned.

Extracts a substring of data. For example:

substr("test",0,1) 

returns "t", while

substr("test",1,2) 

returns "es". All arguments are evaluated; if the designated characters don't exist, an empty string is return.

Note that in expressions like

$Initial=substr($Name,0,1) 

the value of $Name is not changed.


Possible relevant notes (via "Similar Notes" feature):

Up: Full Operator List
Previous: String.uppercase()  Next: sum(group, value) 

A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : substr(data,start[,length])

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox