aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/common/unistr_props.cpp
diff options
context:
space:
mode:
authorneksard <neksard@yandex-team.ru>2022-02-10 16:45:33 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:33 +0300
commit1d9c550e7c38e051d7961f576013a482003a70d9 (patch)
treeb2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /contrib/libs/icu/common/unistr_props.cpp
parent8f7cf138264e0caa318144bf8a2c950e0b0a8593 (diff)
downloadydb-1d9c550e7c38e051d7961f576013a482003a70d9.tar.gz
Restoring authorship annotation for <neksard@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/common/unistr_props.cpp')
-rw-r--r--contrib/libs/icu/common/unistr_props.cpp150
1 files changed, 75 insertions, 75 deletions
diff --git a/contrib/libs/icu/common/unistr_props.cpp b/contrib/libs/icu/common/unistr_props.cpp
index b1c68567aa..4006475790 100644
--- a/contrib/libs/icu/common/unistr_props.cpp
+++ b/contrib/libs/icu/common/unistr_props.cpp
@@ -1,77 +1,77 @@
// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-/*
-*******************************************************************************
-*
-* Copyright (C) 1999-2011, International Business Machines
-* Corporation and others. All Rights Reserved.
-*
-*******************************************************************************
-* file name: unistr_props.cpp
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+*******************************************************************************
+*
+* Copyright (C) 1999-2011, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+*******************************************************************************
+* file name: unistr_props.cpp
* encoding: UTF-8
-* tab size: 8 (not used)
-* indentation:2
-*
-* created on: 2004aug25
-* created by: Markus W. Scherer
-*
-* Character property dependent functions moved here from unistr.cpp
-*/
-
-#include "unicode/utypes.h"
-#include "unicode/uchar.h"
-#include "unicode/unistr.h"
-#include "unicode/utf16.h"
-
-U_NAMESPACE_BEGIN
-
-UnicodeString&
-UnicodeString::trim()
-{
- if(isBogus()) {
- return *this;
- }
-
- UChar *array = getArrayStart();
- UChar32 c;
- int32_t oldLength = this->length();
- int32_t i = oldLength, length;
-
- // first cut off trailing white space
- for(;;) {
- length = i;
- if(i <= 0) {
- break;
- }
- U16_PREV(array, 0, i, c);
- if(!(c == 0x20 || u_isWhitespace(c))) {
- break;
- }
- }
- if(length < oldLength) {
- setLength(length);
- }
-
- // find leading white space
- int32_t start;
- i = 0;
- for(;;) {
- start = i;
- if(i >= length) {
- break;
- }
- U16_NEXT(array, i, length, c);
- if(!(c == 0x20 || u_isWhitespace(c))) {
- break;
- }
- }
-
- // move string forward over leading white space
- if(start > 0) {
- doReplace(0, start, 0, 0, 0);
- }
-
- return *this;
-}
-
-U_NAMESPACE_END
+* tab size: 8 (not used)
+* indentation:2
+*
+* created on: 2004aug25
+* created by: Markus W. Scherer
+*
+* Character property dependent functions moved here from unistr.cpp
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/uchar.h"
+#include "unicode/unistr.h"
+#include "unicode/utf16.h"
+
+U_NAMESPACE_BEGIN
+
+UnicodeString&
+UnicodeString::trim()
+{
+ if(isBogus()) {
+ return *this;
+ }
+
+ UChar *array = getArrayStart();
+ UChar32 c;
+ int32_t oldLength = this->length();
+ int32_t i = oldLength, length;
+
+ // first cut off trailing white space
+ for(;;) {
+ length = i;
+ if(i <= 0) {
+ break;
+ }
+ U16_PREV(array, 0, i, c);
+ if(!(c == 0x20 || u_isWhitespace(c))) {
+ break;
+ }
+ }
+ if(length < oldLength) {
+ setLength(length);
+ }
+
+ // find leading white space
+ int32_t start;
+ i = 0;
+ for(;;) {
+ start = i;
+ if(i >= length) {
+ break;
+ }
+ U16_NEXT(array, i, length, c);
+ if(!(c == 0x20 || u_isWhitespace(c))) {
+ break;
+ }
+ }
+
+ // move string forward over leading white space
+ if(start > 0) {
+ doReplace(0, start, 0, 0, 0);
+ }
+
+ return *this;
+}
+
+U_NAMESPACE_END