Difference between revisions of "NXSL:left"

From NetXMS Wiki
Jump to navigation Jump to search
(Initial version)
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
Returns the string of ''length'' characters of ''string'', optionally padded with ''pad'' character instead of blank.
Returns the string of ''length'' characters of ''string'', optionally padded with ''pad'' character instead of a space.





Revision as of 08:29, 22 October 2014

Returns the string of length characters of string, optionally padded with pad character instead of a space.


Syntax

left(string, length [,pad]);


Parameters

string The string which will be processed.
length The number of character to return, must be a positive integer.
pad [Optional] The pad character to use instead of blank spaces.


Return Value

String of the left length characters.


Examples

left("abc d",8)  	->	"abc d   "
left("abc d",8,".")  	->	"abc d..."
left("abc  def",7)	->	"abc  de"