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).
Returns: string
Table 1.
Parameter | Type | Description |
---|---|---|
str | string | the string to left pad |
length | integer | the length to which to pad the string |
pad | string | an optional padding character |
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) { }
Table 2. Results
lpad |
---|
foo |