Skip to content

Commit

Permalink
Update website/docs/sql/scalar_func/string.md
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Vogelsgesang <[email protected]>
  • Loading branch information
littlegrasscao and vogelsgesang authored Sep 25, 2024
1 parent abe930f commit 75fb837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/sql/scalar_func/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Function|Return Type|Description|Example
`right(str text, n int)`|`text`|Return last `<n>` characters in the string. When `<n>` is negative, return all but first <code>&#124;&#60;n&#62;&#124;</code> characters.|`right('abcde', 2)``'de'`
`rpad(string text, length int , fill text)`|`text`|Fill up the `string` to length `length` by appending the characters `fill` (a space by default). If the `string` is already longer than `length` then it is truncated.|`rpad('hi', 5, 'xy')``'hixyx'`
`rtrim(string text , characters text)`|`text`|Remove the longest string containing only characters from `characters` (a space by default) from the end of `string`.|`rtrim('testxxzx', 'xyz')``'test'`
`split_part(string text, delimiter text, field int)`|`text`|Split `string` on `delimiter` and return the given field (counting from one, can be a negative value but not zero).|`split_part('abc~@~def~@~ghi', '~@~', 2)``'def'`
`split_part(string text, delimiter text, field int)`|`text`|Split `string` on `delimiter` and return the given field (counting from one). When `n` is negative, returns the `|n|`-th-from-last field. |`split_part('abc~@~def~@~ghi', '~@~', 2)``'def'`
`starts_with(string text, prefix text)`|`boolean`|Return true if string starts with prefix.|`starts_with('alphabet', 'alph')``t`
`strpos(string, substring)`|`int`|Location of specified substring (same as `position(substring in string)`, but note the reversed argument order).|`strpos('high', 'ig')``2`
`substr(string, from , count)`|`text`|Extract substring (same as `substring(string from from for count)`).|`substr('alphabet', 3, 2)``'ph'`
Expand Down

0 comments on commit 75fb837

Please sign in to comment.