Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ltrim()
Removes the specified characters from the beginning of a string.
Syntax
ltrim(string,substr)
Usage
Removes every instance of each character in
substr from the beginning of string. This
function is case-sensitive. To remove leading spaces, do not specify a value for
substr.
Example
This example shows that ltrim removes the specified characters from the beginning of a string. This function is case-sensitive.
1q = load "test";
2q = foreach q generate 'Company' as 'Company', ltrim('Company',"abc") as 'ltrim abc',
3 ltrim('Company',"cba") as 'ltrim cba', ltrim('Company',"ab") as 'ltrim ab',
4 ltrim('Company',"bc") as 'ltrim bc';