osmanip
Library with useful output stream tools like: color and style manipulators, progress bars and terminal graphics.
Namespaces | Functions
strings.cpp File Reference
#include <osmanip/utility/iostream.hpp>
#include <osmanip/utility/strings.hpp>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <ostream>
#include <stdexcept>
#include <string>
#include <string_view>
Include dependency graph for strings.cpp:

Namespaces

 osm
 

Functions

std::string osm::trim_string (const std::string &str)
 Removes all leading and trailing spaces from a string. More...
 
size_t osm::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. More...
 
std::string osm::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 the string. Can be used in a loop with appending data by using optional arguments. More...
 
std::string osm::get_ansi_csi_string (const std::string &str, size_t esc_pos)
 
int32_t osm::get_ansi_csi_number (const std::string &csi)
 
char osm::get_ansi_csi_code (const std::string &csi)
 

Detailed Description

Author
Joel Thomas (joelt.nosp@m.homa.nosp@m.s.e@g.nosp@m.mail.nosp@m..com)
Date
2022-10-5