summaryrefslogtreecommitdiffstats
path: root/accessible/base/nsCoreUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'accessible/base/nsCoreUtils.cpp')
-rw-r--r--accessible/base/nsCoreUtils.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/accessible/base/nsCoreUtils.cpp b/accessible/base/nsCoreUtils.cpp
index c5e89258fa..3e66fa9c23 100644
--- a/accessible/base/nsCoreUtils.cpp
+++ b/accessible/base/nsCoreUtils.cpp
@@ -547,32 +547,6 @@ bool nsCoreUtils::IsWhitespaceString(const nsAString& aString) {
return iterBegin == iterEnd;
}
-void nsCoreUtils::TrimNonBreakingSpaces(nsAString& aString) {
- if (aString.IsEmpty()) {
- return;
- }
-
- // Find the index past the last nbsp prefix character.
- constexpr char16_t nbsp{0xA0};
- size_t startIndex = 0;
- while (aString.CharAt(startIndex) == nbsp) {
- startIndex++;
- }
-
- // Find the index before the first nbsp suffix character.
- size_t endIndex = aString.Length() - 1;
- while (endIndex > startIndex && aString.CharAt(endIndex) == nbsp) {
- endIndex--;
- }
- if (startIndex > endIndex) {
- aString.Truncate();
- return;
- }
-
- // Trim the string down, removing the non-breaking space characters.
- aString = Substring(aString, startIndex, endIndex - startIndex + 1);
-}
-
bool nsCoreUtils::AccEventObserversExist() {
nsCOMPtr<nsIObserverService> obsService = services::GetObserverService();
NS_ENSURE_TRUE(obsService, false);