|
ReXGlue SDK
|
#include <initializer_list>#include <string>#include <string_view>#include <vector>#include <rex/platform.h>#include <rex/types.h>Go to the source code of this file.
Namespaces | |
| namespace | rex |
Functions | |
| std::vector< std::string_view > | rex::string::utf8_split_path (const std::string_view path) |
| std::string_view | rex::string::utf8_strip_leading_slashes (const std::string_view path) |
| std::string | rex::string::utf8_join_paths (const std::string_view left_path, const std::string_view right_path, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_join_paths (const std::vector< std::string > &paths, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_join_paths (const std::vector< std::string_view > &paths, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_join_paths (std::initializer_list< const std::string_view > paths, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_join_guest_paths (const std::string_view left_path, const std::string_view right_path) |
| std::string | rex::string::utf8_join_guest_paths (const std::vector< std::string > &paths) |
| std::string | rex::string::utf8_join_guest_paths (const std::vector< std::string_view > &paths) |
| std::string | rex::string::utf8_join_guest_paths (std::initializer_list< const std::string_view > paths) |
| std::string | rex::string::utf8_fix_path_separators (const std::string_view path, char32_t new_separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_find_name_from_path (const std::string_view path, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_find_name_from_guest_path (const std::string_view path) |
| std::string | rex::string::utf8_find_base_name_from_path (const std::string_view path, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_find_base_name_from_guest_path (const std::string_view path) |
| std::string | rex::string::utf8_find_base_path (const std::string_view path, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::utf8_find_base_guest_path (const std::string_view path) |
| std::string | rex::string::utf8_canonicalize_path (const std::string_view path, char32_t separator=kUTF8PathSeparator) |
| std::string | rex::string::NormalizeGuestPath (std::string_view path) |
| std::string | rex::string::utf8_canonicalize_guest_path (const std::string_view path) |
Variables | |
| constexpr char32_t | rex::string::kUTF8PathSeparator = static_cast<char32_t>(rex::platform::kPathSeparator) |
| constexpr char32_t | rex::string::kUTF8GuestPathSeparator = U'\\' |
| std::string rex::string::NormalizeGuestPath | ( | std::string_view | path | ) |
Normalizes a guest path to the lowercase key form with forward slashes and no device prefix.
| std::string rex::string::utf8_canonicalize_path | ( | const std::string_view | path, |
| char32_t | separator = kUTF8PathSeparator ) |
Removes . and .. components from a path. A .. never removes a component that ends in a colon.
| path | Path to canonicalize, split on / and . |
| std::string rex::string::utf8_find_base_name_from_path | ( | const std::string_view | path, |
| char32_t | separator = kUTF8PathSeparator ) |
Returns the last component of a path without its last extension. A name whose only dot is its first character is kept whole.
| std::string rex::string::utf8_find_base_path | ( | const std::string_view | path, |
| char32_t | separator = kUTF8PathSeparator ) |
Returns the parent of a path, or an empty string when the path has no separator. A parent that ends in a colon keeps its trailing separator.
| std::string rex::string::utf8_find_name_from_path | ( | const std::string_view | path, |
| char32_t | separator = kUTF8PathSeparator ) |
Returns the last component of a path, ignoring trailing separators, or an empty string for an empty path or only separators.
| std::string rex::string::utf8_fix_path_separators | ( | const std::string_view | path, |
| char32_t | new_separator = kUTF8PathSeparator ) |
Replaces every / and \ with one separator and collapses repeated separators.
| std::string rex::string::utf8_join_paths | ( | const std::string_view | left_path, |
| const std::string_view | right_path, | ||
| char32_t | separator = kUTF8PathSeparator ) |
Joins two path segments, adding a separator unless the left segment ends with one.
| left_path | First segment. When empty the result is right_path. |
| right_path | Second segment. When empty the result is left_path. |
| std::vector< std::string_view > rex::string::utf8_split_path | ( | const std::string_view | path | ) |
Splits a path on both / and \ and omits empty parts.