mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:17:34 +00:00
AK: Change some argument and return types in Utf8View from int to size_t
This changes the return type of Utf8View::byte_length and the argument types of substring_view from int to size_t.
This commit is contained in:
parent
7cd49ba2a2
commit
8c19c2f296
2 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ size_t Utf8View::byte_offset_of(const Utf8CodepointIterator& it) const
|
||||||
return it.m_ptr - begin_ptr();
|
return it.m_ptr - begin_ptr();
|
||||||
}
|
}
|
||||||
|
|
||||||
Utf8View Utf8View::substring_view(int byte_offset, int byte_length) const
|
Utf8View Utf8View::substring_view(size_t byte_offset, size_t byte_length) const
|
||||||
{
|
{
|
||||||
StringView string = m_string.substring_view(byte_offset, byte_length);
|
StringView string = m_string.substring_view(byte_offset, byte_length);
|
||||||
return Utf8View { string };
|
return Utf8View { string };
|
||||||
|
|
|
@ -55,9 +55,9 @@ public:
|
||||||
Utf8CodepointIterator end() const;
|
Utf8CodepointIterator end() const;
|
||||||
|
|
||||||
const unsigned char* bytes() const { return begin_ptr(); }
|
const unsigned char* bytes() const { return begin_ptr(); }
|
||||||
int byte_length() const { return m_string.length(); }
|
size_t byte_length() const { return m_string.length(); }
|
||||||
size_t byte_offset_of(const Utf8CodepointIterator&) const;
|
size_t byte_offset_of(const Utf8CodepointIterator&) const;
|
||||||
Utf8View substring_view(int byte_offset, int byte_length) const;
|
Utf8View substring_view(size_t byte_offset, size_t byte_length) const;
|
||||||
bool is_empty() const { return m_string.is_empty(); }
|
bool is_empty() const { return m_string.is_empty(); }
|
||||||
|
|
||||||
bool starts_with(const Utf8View&) const;
|
bool starts_with(const Utf8View&) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue