MCPcopy Create free account
hub / github.com/PricelessToolkit/MailBoxGuard / String

Class String

Code/Arduino_libraries/SSD1306/OLEDDisplay.h:48–58  ·  view source on GitHub ↗

* This is a little Arduino String emulation to keep the OLEDDisplay * library code in common between Arduino and mbed-os */

Source from the content-addressed store, hash-verified

46 * library code in common between Arduino and mbed-os
47 */
48class String {
49public:
50 String(const char *s) { _str = s; };
51 int length() { return strlen(_str); };
52 const char *c_str() { return _str; };
53 void toCharArray(char *buf, unsigned int bufsize, unsigned int index = 0) const {
54 memcpy(buf, _str + index, std::min(bufsize, strlen(_str)));
55 };
56private:
57 const char *_str;
58};
59
60#else
61#error "Unkown operating system"

Callers 1

sendHARGBLightMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected