#pragma once

#include <string>
#include <vector>

class StringUtils
{
public:
    static constexpr char LEFT_BRACKET = '<';
    static constexpr char RIGHT_BRACKET = '>';
    static constexpr char FORWARD_SLASH = '/';
    static constexpr char BACK_SLASH = '\\';
    static constexpr char QUESTION_MARK = '?';
    static constexpr char EQUALS = '=';
    static constexpr char DOUBLE_QUOTE = '"';
    static constexpr char SINGLE_QUOTE = '\'';
    static constexpr char COLON = ':';

    static unsigned countFirstConsecutiveHits(const std::string& input, char c);

    static std::string convert(const std::wstring& input);

    static bool isAlphaNumeric(char c);

    static bool isAlphabetical(char c);

    static bool isSpace(char c);

    static bool isWhitespaceOnly(const std::string& input);

    static std::string removeUpTo(const std::string& input, const std::string& prefix);

    static std::vector<std::string> split(const std::string& input);

    static bool startsWith(const std::string& input, const std::string& prefix, bool ignoreWhitespace = false);

    static std::string stripSurroundingWhitepsace(const std::string& input);

    static std::string stripQuotes(const std::string& input);

    static std::vector<unsigned char> toBytes(const std::string& input);

    static std::string toLower(const std::string& s);

    static std::vector<std::string> toLines(const std::string& input);

    static std::string toPaddedString(unsigned numBytes, unsigned entry);

    static std::string toString(const std::vector<unsigned char>& bytes);
};
