diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-28 23:49:50 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-28 23:49:50 -0500 |
commit | afc11065bb151349090d8ae89cb61d1c35bdddae (patch) | |
tree | 41a7133a6e143d6333594d899556831b5a914fc1 /source/fud_utf8.cpp | |
parent | c3cf6df863828798ed8230b0f0966bcf3b2d08dd (diff) |
Prepare for new SSO.
Diffstat (limited to 'source/fud_utf8.cpp')
-rw-r--r-- | source/fud_utf8.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/fud_utf8.cpp b/source/fud_utf8.cpp index bc12c15..ec72b6d 100644 --- a/source/fud_utf8.cpp +++ b/source/fud_utf8.cpp @@ -23,18 +23,13 @@ namespace fud { FudUtf8 FudUtf8::from(const String& fudString, size_t index) noexcept { - if (!fudString.valid()) { - return invalidAscii(); - } - - return from(StringView{fudString}, index); + return from(fudString.asView(), index); } FudUtf8 FudUtf8::from(StringView view, size_t index) noexcept { - auto viewLocal{view}; - auto len = viewLocal.length(); - const auto* vData = viewLocal.data(); + auto len = view.length(); + const auto* vData = view.data(); if (vData == nullptr) { return invalidAscii(); } |