LMMS
Loading...
Searching...
No Matches
ScratchString.cpp
Go to the documentation of this file.
1#include "ScratchString.h"
2#include <cstring>
3#include <cstdio>
4
5namespace zyncarla {
6
8{
9 memset(c_str, 0, sizeof(c_str));
10}
11
13{
14 snprintf(c_str, SCRATCH_SIZE, "%d", num);
15}
16
18{
19 snprintf(c_str, SCRATCH_SIZE, "%d", num);
20}
21
23{
24 if(str)
25 strncpy(c_str, str, SCRATCH_SIZE);
26 else
27 memset(c_str, 0, sizeof(c_str));
28}
29
31{
33 strncpy(ss.c_str, c_str, SCRATCH_SIZE);
34 strncat(ss.c_str, s.c_str, SCRATCH_SIZE-strlen(c_str));
35 return ss;
36}
37
38//ScratchString::operator const char*() const
39//{
40// return c_str;
41//}
42
43}
#define SCRATCH_SIZE
Definition ScratchString.h:2
unsigned s
Definition inflate.c:1555
Definition zynaddsubfx-src.cpp:569
ScratchString(void)
Definition ScratchString.cpp:7
char c_str[SCRATCH_SIZE]
Definition ScratchString.h:18
ScratchString operator+(const ScratchString s)
Definition ScratchString.cpp:30
ss
Definition zipinfo.c:2292