]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/unistr_props.cpp
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *******************************************************************************
6 * Copyright (C) 1999-2011, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 *******************************************************************************
10 * file name: unistr_props.cpp
12 * tab size: 8 (not used)
15 * created on: 2004aug25
16 * created by: Markus W. Scherer
18 * Character property dependent functions moved here from unistr.cpp
21 #include "unicode/utypes.h"
22 #include "unicode/uchar.h"
23 #include "unicode/unistr.h"
24 #include "unicode/utf16.h"
35 UChar
*array
= getArrayStart();
37 int32_t oldLength
= this->length();
38 int32_t i
= oldLength
, length
;
40 // first cut off trailing white space
46 U16_PREV(array
, 0, i
, c
);
47 if(!(c
== 0x20 || u_isWhitespace(c
))) {
51 if(length
< oldLength
) {
55 // find leading white space
63 U16_NEXT(array
, i
, length
, c
);
64 if(!(c
== 0x20 || u_isWhitespace(c
))) {
69 // move string forward over leading white space
71 doReplace(0, start
, 0, 0, 0);