CoreSDK  v1.0.0.b1304
r5utils.h
1 /*
2  * Copyright (c) 2022 Infrared5, Inc.
3  * License information: https://account.red5.net/assets/LICENSE.txt
4  *
5  */
6 
7 #pragma once
8 
9 #include <string>
10 #include "r5common.h"
11 
12 namespace r5::common {
19 std::string R5_SDK_CORE_EXPORT StrToUpper(const std::string &str);
26 std::string R5_SDK_CORE_EXPORT StrToLower(const std::string &str);
33 std::string R5_SDK_CORE_EXPORT ToStr(DataType dataType);
40 std::string R5_SDK_CORE_EXPORT ToStr(common::VideoFmt fmt);
48 std::string R5_SDK_CORE_EXPORT Base64Encode(const uint8_t *data, size_t inputLength);
56 std::vector<uint8_t> R5_SDK_CORE_EXPORT Base64Decode(const char *data, size_t inputLength);
65 std::vector<std::string> R5_SDK_CORE_EXPORT splitString(std::string s, std::string delimiter, int maxEntriesCount = -1);
66 
72 void R5_SDK_CORE_EXPORT ltrim(std::string &s);
73 
79 void R5_SDK_CORE_EXPORT rtrim(std::string &s);
80 
86 void R5_SDK_CORE_EXPORT trim(std::string &s);
93 std::string R5_SDK_CORE_EXPORT ltrimCopy(std::string s);
100 std::string R5_SDK_CORE_EXPORT rtrimCopy(std::string s);
107 std::string R5_SDK_CORE_EXPORT trimCopy(std::string s);
108 }
Definition: r5codec.h:12