HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
StringHelpers.h
Go to the documentation of this file.
1#pragma once
2#include "HephShared.h"
3#include "Guid.h"
4#include <string>
5#include <vector>
6
9namespace Heph
10{
17 {
18 public:
19 StringHelpers() = delete;
20 StringHelpers(const StringHelpers&) = delete;
21 StringHelpers& operator=(const StringHelpers&) = delete;
22
23 public:
24 static std::wstring StrToWide(const std::string& str);
25 static std::string WideToStr(const std::wstring& wstr);
26 static std::vector<std::string> Split(const std::string& str, const std::string& separator);
27 static std::vector<std::wstring> Split(const std::wstring& wstr, const std::wstring& separator);
28 static std::string ToString(int16_t value);
29 static std::string ToString(uint16_t value);
30 static std::string ToString(int32_t value);
31 static std::string ToString(uint32_t value);
32 static std::string ToString(int64_t value);
33 static std::string ToString(uint64_t value);
34 static std::string ToString(double value);
35 static std::string ToString(double value, size_t precision);
36 static std::string ToString(const Guid& guid);
37 static std::string ToHexString(int8_t value);
38 static std::string ToHexString(uint8_t value);
39 static std::string ToHexString(int16_t value);
40 static std::string ToHexString(uint16_t value);
41 static std::string ToHexString(int32_t value);
42 static std::string ToHexString(uint32_t value);
43 static std::string ToHexString(int64_t value);
44 static std::string ToHexString(uint64_t value);
45 static int16_t StringToS16(const std::string& string);
46 static uint16_t StringToU16(const std::string& string);
47 static int32_t StringToS32(const std::string& string);
48 static uint32_t StringToU32(const std::string& string);
49 static int64_t StringToS64(const std::string& string);
50 static uint64_t StringToU64(const std::string& string);
51 static double StringToDouble(const std::string& string);
52 static Guid StringToGuid(const std::string& string);
53 static int16_t HexStringToS16(const std::string& hexString);
54 static uint16_t HexStringToU16(const std::string& hexString);
55 static int32_t HexStringToS32(const std::string& hexString);
56 static uint32_t HexStringToU32(const std::string& hexString);
57 static int64_t HexStringToS64(const std::string& hexString);
58 static uint64_t HexStringToU64(const std::string& hexString);
59 };
60}
#define HEPH_API
Definition HephShared.h:132
provides methods for string processing.
Definition StringHelpers.h:17
struct for storing globally unique identifiers.
Definition Guid.h:14