25#ifndef _OCPN_UTILS_H__
26#define _OCPN_UTILS_H__
35bool endswith(
const std::string& s,
const std::string& suffix);
37bool startswith(
const std::string& s,
const std::string& prefix);
39std::string ltrim(std::string s);
41std::string rtrim(std::string s);
43std::string trim(std::string s);
45std::string join(std::vector<std::string> v,
char c);
47std::string tolower(
const std::string& s);
49std::vector<std::string> split(
const char* s,
const std::string& delimiter);
50std::vector<std::string> split(
const std::string& s,
51 const std::string& delimiter);
53bool exists(
const std::string& path);
55void mkdir(
const std::string path);
57bool replace(std::string& str,
const std::string& from,
const std::string& to);
59void copy_file(
const std::string& src_path,
const std::string& dest_path);
69std::string
printable(
const std::string str);
Standard, mostly strings utilities.
std::string printable(const std::string str)
Return copy of str with non-printable chars replaced by hex like "<0D>".
bool N0183CheckSumOk(const std::string &sentence)
Check if checksum in a NMEA0183 sentence is correct.