aboutsummaryrefslogtreecommitdiff
path: root/src/tests/fstrformat.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-11-08 06:56:58 +0000
committerMike Buland <eichlan@xagasoft.com>2007-11-08 06:56:58 +0000
commit414328563a8c3972e8d053fb770741eb0123d826 (patch)
tree5988aa86d29c9cdc848b829e67034ec151c8f5df /src/tests/fstrformat.cpp
parentef5e980ae9ab4ddb47e79783455b78de4b90366a (diff)
downloadlibbu++-414328563a8c3972e8d053fb770741eb0123d826.tar.gz
libbu++-414328563a8c3972e8d053fb770741eb0123d826.tar.bz2
libbu++-414328563a8c3972e8d053fb770741eb0123d826.tar.xz
libbu++-414328563a8c3972e8d053fb770741eb0123d826.zip
Bu::FString now has the functions format, formatAppend, and formatPrepend, all
of which use printf style formatting and accept the same parameters as printf.
Diffstat (limited to '')
-rw-r--r--src/tests/fstrformat.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/fstrformat.cpp b/src/tests/fstrformat.cpp
new file mode 100644
index 0000000..dbf6133
--- /dev/null
+++ b/src/tests/fstrformat.cpp
@@ -0,0 +1,12 @@
1#include "bu/fstring.h"
2#include <stdio.h>
3
4int main()
5{
6 Bu::FString s;
7
8 s.format("%d, %f, \'%s\'", 144, 12.5, "bob" );
9
10 printf("test: %s\n", s.getStr() );
11}
12