summaryrefslogtreecommitdiff
path: root/source/fud_utf8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fud_utf8.cpp')
-rw-r--r--source/fud_utf8.cpp11
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();
}