You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
277 B
C
15 lines
277 B
C
17 years ago
|
#include <fmt.h>
|
||
|
#include <string.h>
|
||
|
#include <assert.h>
|
||
|
|
||
|
int main() {
|
||
|
char buf[100];
|
||
|
buf[5]='x';
|
||
|
assert(fmt_str(buf,"fnord")==5);
|
||
|
assert(buf[5]=='x');
|
||
|
buf[5]=0;
|
||
|
assert(!strcmp(buf,"fnord"));
|
||
|
assert(fmt_strm(buf,"Fn","0rd")==5);
|
||
|
assert(!strcmp(buf,"Fn0rd"));
|
||
|
}
|