Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
string_conversion.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_FML_STRING_CONVERSION_H_
6#define FLUTTER_FML_STRING_CONVERSION_H_
7
8#include <filesystem>
9#include <string>
10#include <vector>
11
12namespace fml {
13
14// Returns a string joined by the given delimiter.
15std::string Join(const std::vector<std::string>& vec, const char* delimiter);
16
17// Returns a UTF-8 encoded equivalent of a UTF-16 encoded input string.
18std::string Utf16ToUtf8(const std::u16string_view string);
19
20// Returns a UTF-16 encoded equivalent of a UTF-8 encoded input string.
21std::u16string Utf8ToUtf16(const std::string_view string);
22
23// Returns the pathname encoded in UTF-8.
24std::string PathToUtf8(const std::filesystem::path& path);
25
26} // namespace fml
27
28#endif // FLUTTER_FML_STRING_CONVERSION_H_
std::string Utf16ToUtf8(const std::u16string_view string)
std::string PathToUtf8(const std::filesystem::path &path)
std::u16string Utf8ToUtf16(const std::string_view string)
std::string Join(const std::vector< std::string > &vec, const char *delim)