OpenMS
Loading...
Searching...
No Matches
StringUtilsSimple.h File Reference
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/DATASTRUCTURES/String.h>
#include <OpenMS/CONCEPT/Exception.h>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <string_view>
#include <string>
#include <vector>
Include dependency graph for StringUtilsSimple.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 
namespace  OpenMS::StringUtils
 

Functions

static String numberLength (double d, UInt n)
 Functions.
 
static StringfillLeft (String &this_s, char c, UInt size)
 
static StringfillRight (String &this_s, char c, UInt size)
 
static bool hasPrefix (const String &this_s, const String &string)
 
static bool hasSuffix (const String &this_s, const String &string)
 
static bool hasSubstring (const String &this_s, const String &string)
 
static bool has (const String &this_s, Byte byte)
 
static String prefix (const String &this_s, size_t length)
 
static String suffix (const String &this_s, size_t length)
 
static String prefix (const String &this_s, Int length)
 
static String suffix (const String &this_s, Int length)
 
static String prefix (const String &this_s, char delim)
 
static String suffix (const String &this_s, char delim)
 
static String substr (const String &this_s, size_t pos, size_t n)
 
static String chop (const String &this_s, Size n)
 
static Stringtrim (String &this_s)
 
static bool isQuoted (const String &this_s, char q)
 
static Stringquote (String &this_s, char q, String::QuotingMethod method)
 
static Stringunquote (String &this_s, char q, String::QuotingMethod method)
 
static Stringsimplify (String &this_s)
 
static String random (UInt length)
 
static Stringreverse (String &this_s)
 
static bool split (const String &this_s, const char splitter, std::vector< String > &substrings, bool quote_protect)
 
static bool split (const String &this_s, const String &splitter, std::vector< String > &substrings)
 
static bool split_quoted (const String &this_s, const String &splitter, std::vector< String > &substrings, char q, String::QuotingMethod method)
 
static StringtoUpper (String &this_s)
 
static StringfirstToUpper (String &this_s)
 
static StringtoLower (String &this_s)
 
static Stringsubstitute (String &this_s, char from, char to)
 
static Stringsubstitute (String &this_s, const String &from, const String &to)
 
static Stringremove (String &this_s, char what)
 
static StringensureLastChar (String &this_s, char end)
 
const char * skipWhitespace (const char *p, const char *p_end)
 Get the first non-whitespace character (anything but \n, \t, \r, ' ') in the string pointed to by p (where p_end is past the end of the string).
 
int skipWhitespace (const std::string_view &data)
 Get the number of whitespace characters (\n, \t, \r, ' ') in the prefix of data.
 
const char * skipNonWhitespace (const char *p, const char *p_end)
 Get the first whitespace character (\n, \t, \r, ' ') in the string pointed to by p (where p_end is past the end of the string).
 
int skipNonWhitespace (const std::string_view &data)
 return the number of non-whitespace characters (anything but \n, \t, \r, ' ') in the prefix of data
 
static StringremoveWhitespaces (String &this_s)