Gyoji Compiler
Loading...
Searching...
No Matches
src
misc
gyoji-misc
jstring.hpp
1
#pragma once
2
3
#include <
string
>
4
#include <
vector
>
5
6
namespace
Gyoji::misc {
7
8
std::vector<std::string>
string_split(
const
std::string
&str,
const
std::string
&delimiter);
9
10
bool
startswith(
const
std::string
& s,
const
std::string
& prefix);
11
bool
endswith(
const
std::string
& s,
const
std::string
& suffix);
12
std::string
join(
const
std::vector<std::string>
& list,
std::string
delimiter);
13
std::string
join_nonempty(
const
std::string
&a,
const
std::string
& b,
std::string
delimiter);
14
15
std::string
string_remove(
const
std::string
& str,
const
std::string
& remove);
16
17
std::string
string_replace_start(
std::string
str,
const
std::string
from,
const
std::string
to);
18
19
bool
string_c_escape(
std::string
& escaped_string,
const
std::string
& unescaped_string,
bool
is_char);
20
28
bool
string_c_unescape(
std::string
& unescaped_string,
size_t
& location,
const
std::string
& escaped_string,
bool
is_char);
29
30
31
};
string
vector
std::basic_string
std::vector
Generated by
1.9.8