44
55Basic utils for wsjcpp
66
7- * included helpers functions, logger and etc.*
7+ * include helper functions, logger and etc.*
88
99## Integrate to your project
1010
@@ -19,13 +19,13 @@ Or include files:
1919
2020## Logger (WSJCppLog)
2121
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)
2525* WSJCppLog::throw_err - will be generate ` throw std::runtime_error(sMessage); `
2626* std::vector< std::string > WSJCppLog::getLastLogMessages() - last 50 records from log
2727
28- In main your need init logger first.
28+ In main() you need to init logger first.
2929
3030```
3131#include <wsjcpp_core.h>
@@ -43,7 +43,7 @@ int main(int argc, char* argv[]) {
4343}
4444```
4545
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 :
4747
4848```
4949#include <wsjcpp_core.h>
@@ -68,7 +68,7 @@ Example output
6868
6969### doNormalizePath
7070
71- Normalize paths. for example: ".//../bin/some/../" -> "./../bin/"
71+ Normalize paths. For example: ".//../bin/some/../" -> "./../bin/"
7272
7373```
7474std::string sPath = WSJCppCore::doNormalizePath(".//../bin/some/../");
@@ -179,7 +179,7 @@ static bool writeFile(const std::string &sFilename, const char *pBuffer, const i
179179
180180### readTextFile
181181
182- Reading text files to std::string
182+ Read text files into std::string
183183```
184184std::string sContent;
185185if (WSJCppCore::readTextFile("./file.txt", sContent)) {
@@ -213,10 +213,11 @@ static std::string& to_lower(std::string& str);
213213
214214```
215215static std::string toUpper(const std::string& str);
216+ ```
216217
217218### createUuid
218219
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)
220221
221222```
222223WSJCppCore::initRandom(); // once in main on start
@@ -265,7 +266,7 @@ std::string sProtocol = WSJCppCore::extractURLProtocol("https://github.com/wsjcp
265266
266267### getEnv
267268
268- Get system environments
269+ Get the value of a system environment variable
269270```
270271std::string sValue;
271272if (WSJCppCore::getEnv("PATH", sValue)) {
@@ -276,4 +277,4 @@ if (WSJCppCore::getEnv("PATH", sValue)) {
276277Example output:
277278```
278279/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
279- ```
280+ ```
0 commit comments