2015-07-06 15:29:41 -07:00
|
|
|
#include <cstdio>
|
|
|
|
#include <iostream>
|
|
|
|
#include <pipecolors.h>
|
2015-07-15 14:02:18 -07:00
|
|
|
#include <climits>
|
2015-07-06 15:29:41 -07:00
|
|
|
using namespace pipecolors;
|
|
|
|
|
|
|
|
int main(void) {
|
2015-07-15 14:02:18 -07:00
|
|
|
|
|
|
|
char buffer[UCHAR_MAX];
|
2015-07-06 15:29:41 -07:00
|
|
|
int num = 5;
|
|
|
|
const char* str = "My number is";
|
2015-07-15 14:02:18 -07:00
|
|
|
const char* str2 = "|03My number is|11|30";
|
|
|
|
int len = pcprintf("|01%s |41|09|30%d|39\n", str, num);
|
|
|
|
pcprintf("|10Length of Len is : |15|30%d\n|07", len);
|
|
|
|
int len2 = pcsprintf(buffer, "%s %d|39\n", str2, num);
|
|
|
|
printf("%s", buffer);
|
|
|
|
pcprintf("|10Length of Len2 is : |15|30%d\n|07", len2);
|
2015-07-06 15:29:41 -07:00
|
|
|
return 0;
|
|
|
|
}
|