diff options
author | Linus Groh <mail@linusgroh.de> | 2021-02-20 22:39:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-21 19:47:47 +0100 |
commit | 4fafe14691512b787f15de292029c145566786f4 (patch) | |
tree | 06f220c171104c012a34c251f37b09622c76e528 /AK/String.h | |
parent | 43948aee51f6e535eb98a73666d4c76deabe7b44 (diff) | |
download | serenity-4fafe14691512b787f15de292029c145566786f4.zip |
AK: Add String{,Utils}::to_snakecase()
This is an improved version of WrapperGenerator's snake_name(), which
seems like the kind of thing that could be useful elsewhere but would
end up getting duplicated - so let's add this to AK::String instead,
like to_{lowercase,uppercase}().
Diffstat (limited to 'AK/String.h')
-rw-r--r-- | AK/String.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/String.h b/AK/String.h index 877cc97b71..737b7118f9 100644 --- a/AK/String.h +++ b/AK/String.h @@ -131,6 +131,7 @@ public: String to_lowercase() const; String to_uppercase() const; + String to_snakecase() const; bool is_whitespace() const { return StringUtils::is_whitespace(*this); } |