mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:57:44 +00:00
AK: Add AKString::split_limit to split strings with a limit
This is a small change to the existing split() functionality to support the case of splitting a string and stopping at a certain number of tokens. This is useful for parsing e.g. key/value pairs, where the value may contain the delimiter you're splitting on.
This commit is contained in:
parent
ccc6e69a29
commit
042895317d
2 changed files with 7 additions and 1 deletions
|
@ -109,6 +109,7 @@ public:
|
|||
return m_impl->to_uppercase();
|
||||
}
|
||||
|
||||
Vector<String> split_limit(char separator, int limit) const;
|
||||
Vector<String> split(char separator) const;
|
||||
String substring(int start, int length) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue