ng:trimRight

ng:trimRight

The built-in function, 

ng:trimRight()
trims any trailing blanks from a string, which is the input for the function.

 

Example:

This expression outputs the string: '   abc':

  

 

You can also see the difference, if you combine this function with the concat function, which concatenates multiple strings:

 

This expression outputs: '<   abc>':

   

 

AlertIf you get the error message: "Required cardinality of first argument of <function()> is zero or one; supplied value contains <x> items", then you should refer to the suggestions here.


    • Related Articles

    • ng:decrypt

      The built-in function, ng:decrypt is linked with the encryption functions: ng:encrypt and the workflow component, Set secure workflow variable. The function, ng:decrypt() can decrypt contents, that was previously encrypted with these functions. The ...
    • ng:minimum

      InterFormNG2 includes the special built-in XPath function, ng:minimum. This function returns the smallest value of two numeric arguments. The function only accepts two numeric arguments - no more and no less. Examples: ng:minimum(-14,2) returns: -14 ...
    • ng:base64

      The built-in function, ng:base64() converts a string (text) into a base64 based string. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed. This function is ...
    • ng:spaceConcat

      The built-in function, ng:spaceConcat(), helps concatenate two strings with a space character automatically inserted between them. Here is an example: This XPath expression: ng:spaceConcat('First name:', 'Jon') outputs this string: First name: Jon ...
    • ng:fileExist

      The ng:fileExist Xpath function has this format: ng:fileExist(path) where path contains the path to a file, that should be verified. The function returns true, if the file exists and false, if the file does not exist. The function can e.g. be used ...