Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add "initcap" function #656

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions extensions/functions_string.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,35 @@ scalar_functions:
char_set:
values: [ UTF8, ASCII_ONLY ]
return: "fixedchar<L1>"
-
name: initcap
description: >-
Converts the input string into init cap case. Capitalize the first character of each word in the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init -> initial

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And cap -> capitalized

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewritten in 94ab9e7, was hard to make it sound good since there's no proper name for the initcap case.

input string, including articles. Implementation should follow the
utf8_unicode_ci collations according to the Unicode Collation Algorithm described at
http://www.unicode.org/reports/tr10/.
impls:
- args:
- value: "string"
name: "input"
options:
char_set:
values: [ UTF8, ASCII_ONLY ]
return: "string"
- args:
- value: "varchar<L1>"
name: "input"
options:
char_set:
values: [ UTF8, ASCII_ONLY ]
return: "varchar<L1>"
- args:
- value: "fixedchar<L1>"
name: "input"
options:
char_set:
values: [ UTF8, ASCII_ONLY ]
return: "fixedchar<L1>"
-
name: char_length
description: >-
Expand Down
Loading