aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/utf8.h
blob: 5c28353416a84f2a79f189488ba124517000394a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <optional>
#include <string_view>

namespace NYql {

bool IsUtf8(const std::string_view& str);

unsigned char WideCharSize(char head);

std::optional<std::string> RoundToNearestValidUtf8(const std::string_view& str, bool roundDown);
std::optional<std::string> NextValidUtf8(const std::string_view& str);
std::optional<std::string> NextLexicographicString(const std::string_view& str);

}