4
4
5
5
Basic utils for wsjcpp
6
6
7
- * included helpers functions, logger and etc.*
7
+ * include helper functions, logger and etc.*
8
8
9
9
## Integrate to your project
10
10
@@ -19,13 +19,13 @@ Or include files:
19
19
20
20
## Logger (WSJCppLog)
21
21
22
- * Output will be collored for console, but for file color will be missing.
23
- * Functions is safe thread.
24
- * Logger have a log-rotate (every 51000 seconds / every day)
22
+ * Output will be collored for console, but color will be missing for files .
23
+ * Functions are safe thread.
24
+ * Logger supports a log rotation (every 51000 seconds / every day)
25
25
* WSJCppLog::throw_err - will be generate ` throw std::runtime_error(sMessage); `
26
26
* std::vector< std::string > WSJCppLog::getLastLogMessages() - last 50 records from log
27
27
28
- In main your need init logger first.
28
+ In main() you need to init logger first.
29
29
30
30
```
31
31
#include <wsjcpp_core.h>
@@ -43,7 +43,7 @@ int main(int argc, char* argv[]) {
43
43
}
44
44
```
45
45
46
- And then in any place in code you can call static functions:
46
+ And then you can call static functions anywhere in your code :
47
47
48
48
```
49
49
#include <wsjcpp_core.h>
@@ -68,7 +68,7 @@ Example output
68
68
69
69
### doNormalizePath
70
70
71
- Normalize paths. for example: ".//../bin/some/../" -> "./../bin/"
71
+ Normalize paths. For example: ".//../bin/some/../" -> "./../bin/"
72
72
73
73
```
74
74
std::string sPath = WSJCppCore::doNormalizePath(".//../bin/some/../");
@@ -179,7 +179,7 @@ static bool writeFile(const std::string &sFilename, const char *pBuffer, const i
179
179
180
180
### readTextFile
181
181
182
- Reading text files to std::string
182
+ Read text files into std::string
183
183
```
184
184
std::string sContent;
185
185
if (WSJCppCore::readTextFile("./file.txt", sContent)) {
@@ -213,10 +213,11 @@ static std::string& to_lower(std::string& str);
213
213
214
214
```
215
215
static std::string toUpper(const std::string& str);
216
+ ```
216
217
217
218
### createUuid
218
219
219
- Generation uuid but before you need call once `WSJCppCore::initRandom();` (for example in main function)
220
+ Generate uuid, but you need to call ` WSJCppCore::initRandom(); ` before it (for example in main() function)
220
221
221
222
```
222
223
WSJCppCore::initRandom(); // once in main on start
@@ -265,7 +266,7 @@ std::string sProtocol = WSJCppCore::extractURLProtocol("https://github.com/wsjcp
265
266
266
267
### getEnv
267
268
268
- Get system environments
269
+ Get the value of a system environment variable
269
270
```
270
271
std::string sValue;
271
272
if (WSJCppCore::getEnv("PATH", sValue)) {
@@ -276,4 +277,4 @@ if (WSJCppCore::getEnv("PATH", sValue)) {
276
277
Example output:
277
278
```
278
279
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
279
- ```
280
+ ```
0 commit comments