added path_fix_separators
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
#define path_notseps "\\"
|
||||
#endif
|
||||
|
||||
// @brief replaces path_notsep with path_sep
|
||||
void path_fix_separators(str* path);
|
||||
|
||||
/// @brief removes part of path after path_sep (including path_sep)
|
||||
/// @return pointer to a segment of path.data or "." if no path_sep has been found
|
||||
str path_dirname(str path);
|
||||
|
||||
@@ -90,6 +90,10 @@ str hex_to_str(Array(u8) buf, bool uppercase);
|
||||
void str_trim(str* line, bool set_zero_at_end);
|
||||
|
||||
|
||||
/// replaces all occurences of `fragment` in `s` with `replacement`
|
||||
void str_replaceChar(str* s, char fragment, char replacement);
|
||||
|
||||
|
||||
///@return s[0..n]
|
||||
static inline str str_sliceBefore(str s, u32 n){
|
||||
return str_construct(s.data, n, false);
|
||||
|
||||
Reference in New Issue
Block a user