view include/core/strings.h @ 45:4b05bc7668eb

filesystem: split config path into dotpath and config, add anime db path EVENTUALLY I'll get around to saving the anime db and list...
author Paper <mrpapersonic@gmail.com>
date Fri, 22 Sep 2023 15:21:55 -0400
parents 2743011a6042
children 4c6dd5999b39
line wrap: on
line source

#ifndef __core__strings_h
#define __core__strings_h

#include <string>
#include <vector>

namespace Strings {

/* Implode function: takes a vector of strings and turns it
   into a string, separated by delimiters. */
std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter);

/* Substring removal functions */
std::string ReplaceAll(const std::string& string, const std::string& find, const std::string& replace);
std::string SanitizeLineEndings(const std::string& string);
std::string RemoveHtmlTags(const std::string& string);

/* stupid HTML bullshit */
std::string TextifySynopsis(const std::string& string);

std::string ToUpper(const std::string& string);
std::string ToLower(const std::string& string);

};     // namespace Strings
#endif // __core__strings_h