You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.
FIRST
Returns the first character(s) of a string, based on the number of characters you specify.
Syntax
FIRST integer CHARACTERS OF string FIRST CHARACTER OF string
Inputs
- integer - A positive integer value. This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. FIRST CHARACTER OF can be used to retrieve only the first character of the string.
- string - An attribute of base type string, an expression that results in a string or a constant string value.
Return type
- string
If you prefer a functional syntax, you can use the STR_FRONT( string, integer ) function. Example: STR_FRONT("Blueriq", 3) = "Blu"
Examples
Entity.attribute | Value | Type |
---|---|---|
File.name | "Thisfile_1.doc" | String |
File.prefix | 8 | Integer |
Expression | Alternative syntax | Result | Type |
---|---|---|---|
FIRST File.prefix CHARACTERS OF File.name | STR_FRONT( File.name , File.prefix ) | Thisfile | String |
FIRST CHARACTER OF File.name | STR_FRONT( File.name , 1 ) | T | String |
FIRST 5 CHARACTERS OF "pieceofcake" | STR_FRONT( "pieceofcake" , 5 ) | piece | String |
Overview
Content Tools