diff --git a/headers/os/support/String.h b/headers/os/support/String.h index 2930b2cc7b..4d45a86dfa 100644 --- a/headers/os/support/String.h +++ b/headers/os/support/String.h @@ -309,7 +309,7 @@ public: // Fast low-level manipulation char* LockBuffer(int32 maxLength); BString& UnlockBuffer(int32 length = -1); - BString& SetCharAt(int32 pos, char to); + BString& SetByteAt(int32 pos, char to); // Upercase <-> Lowercase BString& ToLower(); diff --git a/src/apps/deskcalc/ExpressionTextView.cpp b/src/apps/deskcalc/ExpressionTextView.cpp index 6e527aaa5b..f3fa9f79ee 100644 --- a/src/apps/deskcalc/ExpressionTextView.cpp +++ b/src/apps/deskcalc/ExpressionTextView.cpp @@ -288,13 +288,13 @@ ExpressionTextView::SetValue(BString value) if (digit != 10) break; - value.SetCharAt(offset, '0'); + value.SetByteAt(offset, '0'); } if (digit == 10) { // carry over, shift the result if (value[firstDigit + 1] == '.') { - value.SetCharAt(firstDigit + 1, '0'); - value.SetCharAt(firstDigit, '.'); + value.SetByteAt(firstDigit + 1, '0'); + value.SetByteAt(firstDigit, '.'); } value.Insert('1', 1, firstDigit); @@ -311,7 +311,7 @@ ExpressionTextView::SetValue(BString value) value << 'E' << exponent; } else { // increase the current digit value with one - value.SetCharAt(offset, char(digit + 48)); + value.SetByteAt(offset, char(digit + 48)); // set offset to last digit offset = value.FindFirst('E'); diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 18e0519a15..49eb6f6295 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -2435,7 +2435,7 @@ BrowserWindow::_EncodeURIComponent(const BString& search) for (int32 i = 0; i < result.Length(); i++) { if (escCharList.FindFirst(result[i]) != B_ERROR) { sprintf(hexcode, "%02X", (unsigned int)result[i]); - result.SetCharAt(i, '%'); + result.SetByteAt(i, '%'); result.Insert(hexcode, i + 1); i += 2; } diff --git a/src/kits/mail/HaikuMailFormatFilter.cpp b/src/kits/mail/HaikuMailFormatFilter.cpp index 1cdaeab6e7..b16893858b 100644 --- a/src/kits/mail/HaikuMailFormatFilter.cpp +++ b/src/kits/mail/HaikuMailFormatFilter.cpp @@ -247,7 +247,7 @@ HaikuMailFormatFilter::_RemoveExtraWhitespace(BString& name) if (i == remove + 1 || i == name.Length()) remove++; else - name.SetCharAt(i - spaces, ' '); + name.SetByteAt(i - spaces, ' '); name.Remove(i - remove, remove); i -= remove; spaces = 0; diff --git a/src/kits/support/String.cpp b/src/kits/support/String.cpp index 70a8b370d8..12c09f814f 100644 --- a/src/kits/support/String.cpp +++ b/src/kits/support/String.cpp @@ -1904,7 +1904,7 @@ BString::UnlockBuffer(int32 length) BString& -BString::SetCharAt(int32 pos, char to) +BString::SetByteAt(int32 pos, char to) { if (pos < Length() && _MakeWritable() == B_OK) fPrivateData[pos] = to; diff --git a/src/preferences/mail/DNSQuery.cpp b/src/preferences/mail/DNSQuery.cpp index 8826cdecd0..0f76be0dce 100644 --- a/src/preferences/mail/DNSQuery.cpp +++ b/src/preferences/mail/DNSQuery.cpp @@ -229,14 +229,14 @@ DNSTools::ConvertToDNSName(const BString& string) // set a counts to the dot diff = dot - 1 - lastDot; - outString.SetCharAt(lastDot, (char)diff); + outString.SetByteAt(lastDot, (char)diff); lastDot = dot; } } else lastDot = 0; diff = outString.CountChars() - 1 - lastDot; - outString.SetCharAt(lastDot, (char)diff); + outString.SetByteAt(lastDot, (char)diff); return outString; } @@ -259,7 +259,7 @@ DNSTools::ConvertFromDNSName(const BString& string) if (dot == 0) break; // set a "." - outString.SetCharAt(nextDot, '.'); + outString.SetByteAt(nextDot, '.'); nextDot+= dot + 1; } return outString; diff --git a/src/tests/kits/support/bstring/StringCharAccessTest.cpp b/src/tests/kits/support/bstring/StringCharAccessTest.cpp index 88fa102ba4..0859508352 100644 --- a/src/tests/kits/support/bstring/StringCharAccessTest.cpp +++ b/src/tests/kits/support/bstring/StringCharAccessTest.cpp @@ -27,7 +27,7 @@ StringCharAccessTest::PerformTest(void) //&operator[] NextSubTest(); - string.SetCharAt(0, 'a'); + string.SetByteAt(0, 'a'); CPPUNIT_ASSERT(strcmp(string.String(), "a simple string") == 0); //ByteAt(int32)