lpad
The string function used to left-pad a string to a given length, using a given character (or space, if no character is given).
Parameter | Type | Description |
---|---|---|
| string | the string to left pad |
| integer | the length to which to pad the string |
| string | an optional padding character |
Returns: string
Example
Query:
PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-function-sample-queries/> PREFIX fn: <http://data.world/function/functions#> SELECT (fn:lpad("foo", 8) AS ?lpad) { }
Results:
lpad |
---|
foo |