16 #ifndef OSMANIP_UTILITY_STRINGS_HPP
17 #define OSMANIP_UTILITY_STRINGS_HPP
35 int32_t *last_size =
nullptr);
36 [[maybe_unused]]
extern std::string
trim_string(std::string &str);
37 [[maybe_unused]]
extern size_t find_first_alpha(std::string_view str,
size_t pos);
38 [[maybe_unused]]
extern std::string
get_ansi_csi_string(
const std::string &str,
size_t esc_pos);
41 [[maybe_unused]]
extern void handle_csi(
const std::string &csi_str, std::string &dst_str, int32_t *dst_crsr_pos);
Definition: canvas.cpp:30
void handle_csi(const std::string &csi_str, std::string &dst_str, int32_t *dst_crsr_pos)
size_t find_first_alpha(std::string_view str, size_t pos)
Finds the index of the first alphabetic character in the str, starting from the given position.
Definition: strings.cpp:73
std::string get_formatted_from_ansi(const std::string &str, int32_t *last_pos, int32_t *last_size)
Formats a string according to the ANSI (Control Sequence Introducer) escape sequences present within ...
Definition: strings.cpp:94
int32_t get_ansi_csi_number(const std::string &csi)
Definition: strings.cpp:197
std::string trim_string(const std::string &str)
Removes all leading and trailing spaces from a string.
Definition: strings.cpp:43
std::string get_ansi_csi_string(const std::string &str, size_t esc_pos)
Definition: strings.cpp:176
char get_ansi_csi_code(const std::string &csi)
Definition: strings.cpp:234