mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
Revert "AK: Made Strings reversible"
This reverts commit 26e81ad574
.
We forgot to consider UTF-8 here. String is UTF-8 and we need to be
careful about things like this.
This commit is contained in:
parent
2d1f3ec749
commit
09e89cc55d
4 changed files with 4 additions and 28 deletions
10
AK/String.h
Normal file → Executable file
10
AK/String.h
Normal file → Executable file
|
@ -110,13 +110,6 @@ public:
|
|||
return m_impl->to_uppercase();
|
||||
}
|
||||
|
||||
String reversed() const
|
||||
{
|
||||
if (!m_impl)
|
||||
return String();
|
||||
return m_impl->reversed();
|
||||
}
|
||||
|
||||
Vector<String> split_limit(char separator, int limit) const;
|
||||
Vector<String> split(char separator) const;
|
||||
String substring(int start, int length) const;
|
||||
|
@ -234,6 +227,7 @@ struct Traits<String> : public GenericTraits<String> {
|
|||
struct CaseInsensitiveStringTraits : public AK::Traits<String> {
|
||||
static unsigned hash(const String& s) { return s.impl() ? s.to_lowercase().impl()->hash() : 0; }
|
||||
static bool equals(const String& a, const String& b) { return a.to_lowercase() == b.to_lowercase(); }
|
||||
|
||||
};
|
||||
|
||||
inline bool operator<(const char* characters, const String& string)
|
||||
|
@ -270,5 +264,5 @@ inline bool operator<=(const char* characters, const String& string)
|
|||
|
||||
}
|
||||
|
||||
using AK::CaseInsensitiveStringTraits;
|
||||
using AK::String;
|
||||
using AK::CaseInsensitiveStringTraits;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue