aboutsummaryrefslogtreecommitdiff
path: root/src/formatter.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
commitf5aca1a1b402bd7ebc944dc6e6fe65828d863365 (patch)
tree4a0fdd8e166d5c4b03543279d332b9a858ef62df /src/formatter.cpp
parent10c557562e1d67c55314c212371ea9cb7f802863 (diff)
downloadlibbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.gz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.bz2
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.xz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.zip
Bu::FString is now String, and there's a shell script to fix any other programs
that were using fstring, I hope.
Diffstat (limited to '')
-rw-r--r--src/formatter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/formatter.cpp b/src/formatter.cpp
index 7eaa1e2..9288e91 100644
--- a/src/formatter.cpp
+++ b/src/formatter.cpp
@@ -21,7 +21,7 @@ Bu::Formatter::~Formatter()
21{ 21{
22} 22}
23 23
24void Bu::Formatter::write( const Bu::FString &sStr ) 24void Bu::Formatter::write( const Bu::String &sStr )
25{ 25{
26 rStream.write( sStr ); 26 rStream.write( sStr );
27} 27}
@@ -31,7 +31,7 @@ void Bu::Formatter::write( const void *sStr, int iLen )
31 rStream.write( sStr, iLen ); 31 rStream.write( sStr, iLen );
32} 32}
33 33
34void Bu::Formatter::writeAligned( const Bu::FString &sStr ) 34void Bu::Formatter::writeAligned( const Bu::String &sStr )
35{ 35{
36 int iLen = sStr.getSize(); 36 int iLen = sStr.getSize();
37 if( iLen > fLast.uMinWidth ) 37 if( iLen > fLast.uMinWidth )
@@ -117,9 +117,9 @@ void Bu::Formatter::read( void *sStr, int iLen )
117 rStream.read( sStr, iLen ); 117 rStream.read( sStr, iLen );
118} 118}
119 119
120Bu::FString Bu::Formatter::readToken() 120Bu::String Bu::Formatter::readToken()
121{ 121{
122 Bu::FString sRet; 122 Bu::String sRet;
123 if( fLast.bTokenize ) 123 if( fLast.bTokenize )
124 { 124 {
125 for(;;) 125 for(;;)
@@ -292,7 +292,7 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, char *sStr )
292 return f; 292 return f;
293} 293}
294 294
295Bu::Formatter &Bu::operator<<( Bu::Formatter &f, const Bu::FString &sStr ) 295Bu::Formatter &Bu::operator<<( Bu::Formatter &f, const Bu::String &sStr )
296{ 296{
297 f.writeAligned( sStr ); 297 f.writeAligned( sStr );
298 return f; 298 return f;
@@ -388,7 +388,7 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, bool b )
388 return f; 388 return f;
389} 389}
390 390
391Bu::Formatter &Bu::operator>>( Bu::Formatter &f, Bu::FString &sStr ) 391Bu::Formatter &Bu::operator>>( Bu::Formatter &f, Bu::String &sStr )
392{ 392{
393 sStr = f.readToken(); 393 sStr = f.readToken();
394 return f; 394 return f;
@@ -480,7 +480,7 @@ Bu::Formatter &Bu::operator>>( Bu::Formatter &f, long double &flt )
480 480
481Bu::Formatter &Bu::operator>>( Bu::Formatter &f, bool &b ) 481Bu::Formatter &Bu::operator>>( Bu::Formatter &f, bool &b )
482{ 482{
483 Bu::FString sStr = f.readToken(); 483 Bu::String sStr = f.readToken();
484 if( !sStr.isSet() ) 484 if( !sStr.isSet() )
485 return f; 485 return f;
486 char c = *sStr.begin(); 486 char c = *sStr.begin();