1#include <Core/Utils/StringUtils.hpp>
40 if ( pos == 0 ) { res =
"/"; }
56 if ( pos < res.
length() ) { res = res.
substr( pos + 1 ); }
57 if ( !keepExtension ) {
67 for ( std::string::size_type pos {};
68 inout.npos != ( pos = inout.
find( what.data(), pos, what.length() ) );
69 pos += with.length(), ++count ) {
70 inout.
replace( pos, what.length(), with.data(), with.length() );
76 return replaceAllInString( inout, what,
"" );
80 replace_bracket_block( inout, what,
"", open_sep );
94 const auto it = open_to_close.
find( open_sep );
97 const char close_sep = it->second;
103 for (
size_t pos = inout.
find( target, i ); pos != std::string::npos;
104 pos = inout.
find( target, i ) ) {
106 size_t j = pos + target.
size();
108 while ( j < inout.
size() && depth > 0 ) {
109 if ( inout[j] == open_sep )
111 else if ( inout[j] == close_sep )
116 if ( depth != 0 )
break;
118 while ( j < inout.
size() &&
std::isspace(
static_cast<unsigned char>( inout[j] ) ) ) {
122 inout.
replace( pos, j - pos, with );
T find_first_of(T... args)
T find_last_not_of(T... args)
T find_last_of(T... args)
hepler function to manage enum as underlying types in VariableSet