LTRIM in JS
Last updated
Last updated
Unfortunately, this function is not available in JavaScript, but it can be implemented using regular expressions.
function LTRIM(string){
return string.replace(/^s+/,"");
}
string
: String expression to remove blank spaces.
String.
CREATE OR REPLACE FUNCTION ltrim(str varchar)
RETURNS string
LANGUAGE JAVASCRIPT
AS
$$
function LTRIM(string){
return string.replace(/^s+/,"");
}
return LTRIM(S TR );
$$;
SELECT LTRIM(' FIRST TWO BLANK SPACES') AS LTRIM;