/estd

Esay standard extension for basic types

Primary LanguageC++Apache License 2.0Apache-2.0

estd

Exquisite standard extension for basic types and make c++ as easy as possible.

Manual

Add vscprintf to fix _vscprintf "%S" return -1, also exxsprintf let sprintf more flexible

Using

#include<estd.h> and build the world!!!

The Json parser speed as faster as strlen, enjoy!

estr is useful for Win32 api with disposable towide

estrs is a splitter contains the estr array

all class comply with RAII

header line v1/later: ONLY 1000/1200

estr (deep copy ONLY)

// estr
estr tmp("%d%S", 123, L"456");
tmp = tmp + "789" + "ABCDEF";
printf(*tmp);

dbk("Done!");

image

estrs

// estrs 
estrs tmp("123 456 789", " ");

dbk("Done!");

image

ejson

// ejson
ejson ej(R"({
    "data": {
        "app_enabled": true,
        "app_good": true,
        "app_initialized": true,
        "good": true,
        "online": true,
        "member": ["aaa","bbb","ccc"],
        "stat": {
            "packet_received": 16598,
            "packet_sent": 14505,
            "packet_lost": 0,
            "message_received": 1914,
            "message_sent": 135,
            "disconnect_times": 0,
            "lost_times": 0,
            "last_message_time": 1689350878
        }
    },
    "message": "",
    "retcode": 0,
    "status": "ok"
})");

ejs& js = ej["data"];
if (js) {
  printf("this is a member!\n");
}
int _i = ej["data"]["stat"]["message_sent"];
printf("_i %d", _i);

image

Debug

You can use Visual Vtudio debugger by copy *.nativs to,

> VS2019
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Packages\Debugger\Visualizers

OR

> VS2022
"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Packages\Debugger\Visualizers"

Future

  • estr nativs support
  • estr reserve data manual
  • estr support plus const char*
  • estr support if valid check
  • estrs nativs support
  • ecstr make c++17 encrypt string by stack(v3 made this 12 day to 20.Y.O)
  • ejson nativs support
  • ejson for any type
  • ejson if valid check
  • ejson basic str parser
  • ejson support Obj array
  • ejson support Number array
  • ejson support String array
  • ejson support bool array
  • ejson support parse float array