mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 17:37:35 +00:00
AK: Add FlyString::to_lowercase() and LogStream operator<<(FlyString)
This commit is contained in:
parent
7f8dc347b5
commit
c4a6d6ae9f
6 changed files with 39 additions and 16 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/Memory.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/String.h>
|
||||
|
@ -321,4 +322,23 @@ String escape_html_entities(const StringView& html)
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
String::String(const FlyString& string)
|
||||
: m_impl(string.impl())
|
||||
{
|
||||
}
|
||||
|
||||
String String::to_lowercase() const
|
||||
{
|
||||
if (!m_impl)
|
||||
return {};
|
||||
return m_impl->to_lowercase();
|
||||
}
|
||||
|
||||
String String::to_uppercase() const
|
||||
{
|
||||
if (!m_impl)
|
||||
return {};
|
||||
return m_impl->to_uppercase();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue