mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Generate ValueID-to-enum conversion functions
This commit is contained in:
parent
823d67bfc1
commit
3f61f869c8
Notes:
sideshowbarker
2024-07-17 11:49:09 +09:00
Author: https://github.com/AtkinsSJ
Commit: 3f61f869c8
Pull-request: https://github.com/SerenityOS/serenity/pull/13673
2 changed files with 49 additions and 3 deletions
|
@ -49,6 +49,11 @@ String camel_casify(StringView dashy_name)
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
String snake_casify(String const& dashy_name)
|
||||
{
|
||||
return dashy_name.replace("-", "_", true);
|
||||
}
|
||||
|
||||
ErrorOr<JsonValue> read_entire_file_as_json(StringView filename)
|
||||
{
|
||||
auto file = TRY(Core::Stream::File::open(filename, Core::Stream::OpenMode::Read));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue