Altova MapForce 2024 Enterprise Edition

Returns the portion of the string that occurs before the first occurrence of substr. If substr does not occur in string, the function returns an empty string.

mf-func-substring-before

 

Languages

Built-in, C++, C#, Java, XQuery, XSLT 1.0, XSLT 2.0, XSLT 3.0.

 

Parameters

Name

Description

string

The input string.

substr

The sub-string. Any characters before the first occurrence of substr are the result of the function.

 

Example

If the input string is MapForce, and substr is Force, the function returns Map. If the input string is 2020/01/04 and substr is /, the function returns 2020.

© 2017-2023 Altova GmbH