aboutsummaryrefslogtreecommitdiff
path: root/src/tests/fstring.cpp
blob: cb852823d39adca12328bc63ec463d429996c3a6 (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
29
30
31
32
33
34
35
36
37
#include "fstring.h"

FString genThing()
{
	FString bob;
	bob.append("ab ");
	bob += "cd ";
	bob += "efg";

    printf("---bob------\n%08X: %s\n", (unsigned int)bob.c_str(), bob.c_str() );
	return bob;
}

#define pem printf("---------\n%08X: %s\n%08X: %s\n", (unsigned int)str.c_str(), str.c_str(), (unsigned int)str2.c_str(), str2.c_str() );
int main( int argc, char *argv )
{
	FString str("th");

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

	FString str2( str );
	pem;
	str += "  What's up?";
	pem;
	str2 += "  How are you?";
	pem;
	str = str2;
	pem;

	str2 = genThing();
	pem;

	str = str2;
	pem;
}