You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.

LAST


Returns the last character(s) of a string, based on the number of characters you specify.


Syntax

LAST integer CHARACTERS OF string
LAST 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. LAST CHARACTER OF can be used to retrieve only the last 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_BACK ( string, integer ) function. Example: STR_BACK("Blueriq", 3) = "riq"


Examples

Entity.attributeValueType
File.name"Thisfile_1.doc"String
File.extension3Integer
ExpressionAlternative syntaxResultType
LAST File.extension CHARACTERS OF File.nameSTR_BACK( File.name , File.extension )"doc"String
LAST CHARACTER OF File.nameSTR_BACK( File.name , 1 )"c"String
LAST 4 CHARACTERS OF "pieceofcake"STR_BACK( "pieceofcake" , 4 )"cake"String


Back to Top