aboutsummaryrefslogtreecommitdiff
path: root/src/tests/fstring.cpp
blob: 26905ac6a602e86721573a6795e15cfd475276c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "fstring.h"

int main( int argc, char *argv )
{
	FString str("[] this won't be in there", 3);

	str.append("Hello");
	str.append(" th");
	str.append("ere.");

	if( str == "[] Hello there." )
		printf("1) check\n");

	if( str != "[] Hello there. " )
		printf("2) check\n");

	if( str != "[] Hello there." )
		printf("3) failed\n");
	else
		printf("3) check\n");

	str += "  How are you?";

	str.prepend("Bob says:  ");

	printf("%s\n", str.c_str() );
}