73 template<ice::concepts::StringType StringT>
74 using Path =
typename StringT::PathType;
83 template<
typename Self>
89 template<
typename Self>
92 return self.is_absolute() ==
false;
95 template<
typename Self>
101 template<
typename Self>
107 template<
typename Self>
113 template<
typename Self>
122 template<
typename Self>
128 template<
typename Self>
134 template<
typename Self>
140 template<
typename Self>
147 template<ice::concepts::SupportedCharType CharT>
151 using BasicString<CharT>::operator std::basic_string_view<CharT>;
159 template<ice::concepts::SupportedCharType CharT>
173 template<
typename CharT>
179 template<
typename CharT>
189struct fmt::formatter<
ice::BasicPath<char>> :
public fmt::formatter<std::basic_string_view<char>>
191 template<
typename FormatContext>
194 return fmt::formatter<std::basic_string_view<char>>
::format(value, ctx);
199struct fmt::formatter<
ice::BasicHeapPath<char>> :
public fmt::formatter<ice::BasicPath<char>>
201 template<
typename FormatContext>
204 return fmt::formatter<ice::BasicPath<char>>
::format(value, ctx);
Definition path_utils.hxx:10
auto replace_extension(ice::HeapString<> &path, ice::String extension) noexcept -> ice::String
Replaces the extension (if any) in the path.
auto length(ice::String path) noexcept -> ice::u32
auto directory(ice::String path) noexcept -> ice::String
auto join(ice::HeapString<> &path, ice::String right_path) noexcept -> ice::String
Joins two paths together if possible, the result is stored in the first first variable.
auto extension(ice::String path) noexcept -> ice::String
typename StringT::PathType Path
Definition path_utils.hxx:74
auto basename(ice::String path) noexcept -> ice::String
auto replace_filename(ice::HeapString<> &path, ice::String filename) noexcept -> ice::String
Replaces the filename of in the path. (including the extension).
bool is_absolute_root(ice::String path) noexcept
auto normalize(ice::HeapString<> &path) noexcept -> ice::String
Normalizes the given path in using simple rules.
bool is_absolute(ice::String path) noexcept
auto filename(ice::String path) noexcept -> ice::String
typename StringT::StringType String
Definition string_concepts.hxx:64
SPDX-License-Identifier: MIT.
Definition array.hxx:12
ice::BasicString< char > String
Definition string.hxx:82
ice::BasicString< wchar_t > WString
Definition string.hxx:83
ice::BasicPath< char > Path
Definition path_utils.hxx:170
std::uint32_t u32
Definition types.hxx:26
constexpr auto hash(ice::HeapString<> const &value) noexcept -> ice::u64
Definition heap_string.hxx:251
ice::BasicHeapPath< char > HeapPath
Definition path_utils.hxx:171
Definition path_utils.hxx:161
ice::BasicPath< CharT > PathType
Definition path_utils.hxx:165
Definition path_utils.hxx:149
ice::BasicPath< CharT > PathType
Definition path_utils.hxx:152
constexpr BasicPath(ice::BasicString< CharT > str) noexcept
Definition path_utils.hxx:154
constexpr BasicString() noexcept=default
Definition path_utils.hxx:121
auto normalize(this Self &self) noexcept -> ice::path::Path< Self >
Definition path_utils.hxx:129
auto replace_extension(this Self &self, ice::string::String< Self > extension) noexcept -> ice::path::Path< Self >
Definition path_utils.hxx:141
auto replace_filename(this Self &self, ice::string::String< Self > filename) noexcept -> ice::path::Path< Self >
Definition path_utils.hxx:135
auto join(this Self &self, ice::path::Path< Self > other) noexcept -> ice::path::Path< Self >
Definition path_utils.hxx:123
Definition heap_string.hxx:15
auto size() const noexcept -> SizeType
Definition heap_string.hxx:46
auto data(this Self &self) noexcept -> ValueType *
Definition heap_string.hxx:44
HeapString(ice::Allocator &allocator) noexcept
Definition heap_string.hxx:57
Definition path_utils.hxx:82
constexpr auto filename(this Self const &self) noexcept -> ice::string::String< Self >
Definition path_utils.hxx:102
bool is_absolute(this Self const &self) noexcept
Definition path_utils.hxx:84
bool is_relative(this Self const &self) noexcept
Definition path_utils.hxx:90
constexpr auto extension(this Self const &self) noexcept -> ice::string::String< Self >
Definition path_utils.hxx:96
constexpr auto directory(this Self const &self) noexcept -> ice::path::Path< Self >
Definition path_utils.hxx:114
constexpr auto basename(this Self const &self) noexcept -> ice::string::String< Self >
Definition path_utils.hxx:108