From 414328563a8c3972e8d053fb770741eb0123d826 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 8 Nov 2007 06:56:58 +0000 Subject: Bu::FString now has the functions format, formatAppend, and formatPrepend, all of which use printf style formatting and accept the same parameters as printf. --- src/tests/fstrformat.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/tests/fstrformat.cpp (limited to 'src/tests') 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 @@ +#include "bu/fstring.h" +#include + +int main() +{ + Bu::FString s; + + s.format("%d, %f, \'%s\'", 144, 12.5, "bob" ); + + printf("test: %s\n", s.getStr() ); +} + -- cgit v1.2.3