diff --git a/docs/userguide/dev/codingguidelines.md b/docs/userguide/dev/codingguidelines.md
index b76b5ab8b1b..007780baa90 100644
--- a/docs/userguide/dev/codingguidelines.md
+++ b/docs/userguide/dev/codingguidelines.md
@@ -439,12 +439,30 @@ includes other header files. The most common types are `uint8_t`, `uint16_t`,
`uint32_t`, `int8_t`, `int16_t`, `int32_t`, `char16_t`,
`UChar` (same as `char16_t`), `UChar32` (signed, 32-bit), and `UErrorCode`.
-The language built-in type bool and constants true and false may be used
+The language built-in type `bool` and constants `true` and `false` may be used
internally, for local variables and parameters of internal functions. The ICU
type `UBool` must be used in public APIs and in the definition of any persistent
-data structures. `UBool` is guaranteed to be one byte in size and signed; bool is
+data structures. `UBool` is guaranteed to be one byte in size and signed; `bool` is
not.
+Traditionally, ICU4C has defined its own `FALSE`=0 / `TRUE`=1 macros for use with `UBool`.
+Starting with ICU 68 (2020q4), we no longer define these in public header files
+(unless `U_DEFINE_FALSE_AND_TRUE`=1),
+in order to avoid name collisions with code outside ICU defining enum constants and similar
+with these names.
+
+Instead, the versions of the C and C++ standards we require now do define type `bool`
+and values `false` & `true`, and we and our users can use these values.
+
+As of ICU 68, we are not changing ICU4C API from `UBool` to `bool`.
+Doing so in C API, or in structs that cross the library boundary,
+would break binary compatibility.
+Doing so only in other places in C++ could be confusingly inconsistent.
+We may revisit this.
+
+Note that the details of type `bool` (e.g., `sizeof`) depend on the compiler and
+may differ between C and C++.
+
#### File Names (.h, .c, .cpp, data files if possible, etc.)
Limit file names to 31 lowercase ASCII characters. (Older versions of MacOS have
diff --git a/icu4c/source/common/cmemory.h b/icu4c/source/common/cmemory.h
index 20030e40065..81728b96c5d 100644
--- a/icu4c/source/common/cmemory.h
+++ b/icu4c/source/common/cmemory.h
@@ -292,7 +292,7 @@ class MaybeStackArray {
/**
* Default constructor initializes with internal T[stackCapacity] buffer.
*/
- MaybeStackArray() : ptr(stackArray), capacity(stackCapacity), needToRelease(FALSE) {}
+ MaybeStackArray() : ptr(stackArray), capacity(stackCapacity), needToRelease(false) {}
/**
* Automatically allocates the heap array if the argument is larger than the stack capacity.
* Intended for use when an approximate capacity is known at compile time but the true
@@ -362,7 +362,7 @@ class MaybeStackArray {
releaseArray();
ptr=otherArray;
capacity=otherCapacity;
- needToRelease=FALSE;
+ needToRelease=false;
}
}
/**
@@ -400,7 +400,7 @@ class MaybeStackArray {
void resetToStackArray() {
ptr=stackArray;
capacity=stackCapacity;
- needToRelease=FALSE;
+ needToRelease=false;
}
/* No comparison operators with other MaybeStackArray's. */
bool operator==(const MaybeStackArray & /*other*/) = delete;
@@ -458,7 +458,7 @@ inline T *MaybeStackArray
* @param option the option(s) that are to be checked
- * @return TRUE if any of the option(s) are set
+ * @return true if any of the option(s) are set
* @see #setOption
* @deprecated ICU 56 Use Normalizer2 instead.
*/
diff --git a/icu4c/source/common/unicode/parsepos.h b/icu4c/source/common/unicode/parsepos.h
index 909d288d48d..260ed4cbb86 100644
--- a/icu4c/source/common/unicode/parsepos.h
+++ b/icu4c/source/common/unicode/parsepos.h
@@ -97,14 +97,14 @@ class U_COMMON_API ParsePosition : public UObject {
/**
* Equality operator.
- * @return TRUE if the two parse positions are equal, FALSE otherwise.
+ * @return true if the two parse positions are equal, false otherwise.
* @stable ICU 2.0
*/
inline UBool operator==(const ParsePosition& that) const;
/**
* Equality operator.
- * @return TRUE if the two parse positions are not equal, FALSE otherwise.
+ * @return true if the two parse positions are not equal, false otherwise.
* @stable ICU 2.0
*/
inline UBool operator!=(const ParsePosition& that) const;
@@ -196,9 +196,9 @@ inline UBool
ParsePosition::operator==(const ParsePosition& copy) const
{
if(index != copy.index || errorIndex != copy.errorIndex)
- return FALSE;
+ return false;
else
- return TRUE;
+ return true;
}
inline UBool
diff --git a/icu4c/source/common/unicode/rbbi.h b/icu4c/source/common/unicode/rbbi.h
index cc8b362c9cc..65117f616cd 100644
--- a/icu4c/source/common/unicode/rbbi.h
+++ b/icu4c/source/common/unicode/rbbi.h
@@ -253,20 +253,20 @@ class U_COMMON_API RuleBasedBreakIterator /*U_FINAL*/ : public BreakIterator {
RuleBasedBreakIterator& operator=(const RuleBasedBreakIterator& that);
/**
- * Equality operator. Returns TRUE if both BreakIterators are of the
+ * Equality operator. Returns true if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
* @param that The BreakIterator to be compared for equality
- * @return TRUE if both BreakIterators are of the
+ * @return true if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
* @stable ICU 2.0
*/
virtual UBool operator==(const BreakIterator& that) const;
/**
- * Not-equal operator. If operator== returns TRUE, this returns FALSE,
+ * Not-equal operator. If operator== returns true, this returns false,
* and vice versa.
* @param that The BreakIterator to be compared for inequality
- * @return TRUE if both BreakIterators are not same.
+ * @return true if both BreakIterators are not same.
* @stable ICU 2.0
*/
inline UBool operator!=(const BreakIterator& that) const;
diff --git a/icu4c/source/common/unicode/resbund.h b/icu4c/source/common/unicode/resbund.h
index 28940675287..37738e277b5 100644
--- a/icu4c/source/common/unicode/resbund.h
+++ b/icu4c/source/common/unicode/resbund.h
@@ -286,7 +286,7 @@ class U_COMMON_API ResourceBundle : public UObject {
/**
* Checks whether the resource has another element to iterate over.
*
- * @return TRUE if there are more elements, FALSE if there is no more elements
+ * @return true if there are more elements, false if there is no more elements
* @stable ICU 2.0
*/
UBool
diff --git a/icu4c/source/common/unicode/simpleformatter.h b/icu4c/source/common/unicode/simpleformatter.h
index 9414bca3085..6d9c04ace23 100644
--- a/icu4c/source/common/unicode/simpleformatter.h
+++ b/icu4c/source/common/unicode/simpleformatter.h
@@ -125,7 +125,7 @@ class U_COMMON_API SimpleFormatter U_FINAL : public UMemory {
* @param errorCode ICU error code in/out parameter.
* Must fulfill U_SUCCESS before the function call.
* Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax.
- * @return TRUE if U_SUCCESS(errorCode).
+ * @return true if U_SUCCESS(errorCode).
* @stable ICU 57
*/
UBool applyPattern(const UnicodeString &pattern, UErrorCode &errorCode) {
@@ -144,7 +144,7 @@ class U_COMMON_API SimpleFormatter U_FINAL : public UMemory {
* Must fulfill U_SUCCESS before the function call.
* Set to U_ILLEGAL_ARGUMENT_ERROR for bad argument syntax and
* too few or too many arguments.
- * @return TRUE if U_SUCCESS(errorCode).
+ * @return true if U_SUCCESS(errorCode).
* @stable ICU 57
*/
UBool applyPatternMinMaxArguments(const UnicodeString &pattern,
diff --git a/icu4c/source/common/unicode/strenum.h b/icu4c/source/common/unicode/strenum.h
index 8601f1f7c40..df72b4b7e84 100644
--- a/icu4c/source/common/unicode/strenum.h
+++ b/icu4c/source/common/unicode/strenum.h
@@ -196,7 +196,7 @@ class U_COMMON_API StringEnumeration : public UObject {
* Compares this enumeration to other to check if both are equal
*
* @param that The other string enumeration to compare this object to
- * @return TRUE if the enumerations are equal. FALSE if not.
+ * @return true if the enumerations are equal. false if not.
* @stable ICU 3.6
*/
virtual UBool operator==(const StringEnumeration& that)const;
@@ -204,7 +204,7 @@ class U_COMMON_API StringEnumeration : public UObject {
* Compares this enumeration to other to check if both are not equal
*
* @param that The other string enumeration to compare this object to
- * @return TRUE if the enumerations are equal. FALSE if not.
+ * @return true if the enumerations are equal. false if not.
* @stable ICU 3.6
*/
virtual UBool operator!=(const StringEnumeration& that)const;
diff --git a/icu4c/source/common/unicode/stringpiece.h b/icu4c/source/common/unicode/stringpiece.h
index 52c1e9ebd24..d7c18e74ea6 100644
--- a/icu4c/source/common/unicode/stringpiece.h
+++ b/icu4c/source/common/unicode/stringpiece.h
@@ -209,7 +209,7 @@ class U_COMMON_API StringPiece : public UMemory {
int32_t length() const { return length_; }
/**
* Returns whether the string is empty.
- * @return TRUE if the string is empty
+ * @return true if the string is empty
* @stable ICU 4.2
*/
UBool empty() const { return length_ == 0; }
@@ -331,7 +331,7 @@ class U_COMMON_API StringPiece : public UMemory {
* Global operator == for StringPiece
* @param x The first StringPiece to compare.
* @param y The second StringPiece to compare.
- * @return TRUE if the string data is equal
+ * @return true if the string data is equal
* @stable ICU 4.8
*/
U_EXPORT UBool U_EXPORT2
@@ -341,7 +341,7 @@ operator==(const StringPiece& x, const StringPiece& y);
* Global operator != for StringPiece
* @param x The first StringPiece to compare.
* @param y The second StringPiece to compare.
- * @return TRUE if the string data is not equal
+ * @return true if the string data is not equal
* @stable ICU 4.8
*/
inline UBool operator!=(const StringPiece& x, const StringPiece& y) {
diff --git a/icu4c/source/common/unicode/stringtriebuilder.h b/icu4c/source/common/unicode/stringtriebuilder.h
index 2c47dd415b1..fe471bbbf9c 100644
--- a/icu4c/source/common/unicode/stringtriebuilder.h
+++ b/icu4c/source/common/unicode/stringtriebuilder.h
@@ -279,10 +279,10 @@ class U_COMMON_API StringTrieBuilder : public UObject {
*/
class ValueNode : public Node {
public:
- ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE), value(0) {}
+ ValueNode(int32_t initialHash) : Node(initialHash), hasValue(false), value(0) {}
virtual UBool operator==(const Node &other) const;
void setValue(int32_t v) {
- hasValue=TRUE;
+ hasValue=true;
value=v;
hash=hash*37u+v;
}
diff --git a/icu4c/source/common/unicode/ubidi.h b/icu4c/source/common/unicode/ubidi.h
index 9b048b5b8b5..30008df805c 100644
--- a/icu4c/source/common/unicode/ubidi.h
+++ b/icu4c/source/common/unicode/ubidi.h
@@ -597,7 +597,7 @@ U_NAMESPACE_END
* this "inverse Bidi" and that the current implementation provides only an
* approximation of "inverse Bidi". With With Calling this function with argument Note: calling this function after setting the reordering mode with
- *
- *
@@ -165,11 +165,11 @@ class U_COMMON_API ForwardCharacterIterator : public UObject {
virtual UChar32 next32PostInc(void) = 0;
/**
- * Returns FALSE if there are no more code units or code points
+ * Returns false if there are no more code units or code points
* at or after the current position in the iteration range.
* This is used with nextPostInc() or next32PostInc() in forward
* iteration.
- * @returns FALSE if there are no more code units or code points
+ * @returns false if there are no more code units or code points
* at or after the current position in the iteration range.
* @stable ICU 2.0
*/
@@ -535,12 +535,12 @@ class U_COMMON_API CharacterIterator : public ForwardCharacterIterator {
virtual UChar32 previous32(void) = 0;
/**
- * Returns FALSE if there are no more code units or code points
+ * Returns false if there are no more code units or code points
* before the current position in the iteration range.
* This is used with previous() or previous32() in backward
* iteration.
- * @return FALSE if there are no more code units or code points
- * before the current position in the iteration range, return TRUE otherwise.
+ * @return false if there are no more code units or code points
+ * before the current position in the iteration range, return true otherwise.
* @stable ICU 2.0
*/
virtual UBool hasPrevious() = 0;
diff --git a/icu4c/source/common/unicode/dtintrv.h b/icu4c/source/common/unicode/dtintrv.h
index 15e15c9d405..4f4b6bf7f40 100644
--- a/icu4c/source/common/unicode/dtintrv.h
+++ b/icu4c/source/common/unicode/dtintrv.h
@@ -106,14 +106,14 @@ class U_COMMON_API DateInterval : public UObject {
/**
* Equality operator.
- * @return TRUE if the two DateIntervals are the same
+ * @return true if the two DateIntervals are the same
* @stable ICU 4.0
*/
virtual UBool operator==(const DateInterval& other) const;
/**
* Non-equality operator
- * @return TRUE if the two DateIntervals are not the same
+ * @return true if the two DateIntervals are not the same
* @stable ICU 4.0
*/
inline UBool operator!=(const DateInterval& other) const;
diff --git a/icu4c/source/common/unicode/edits.h b/icu4c/source/common/unicode/edits.h
index c3ceaccb3b3..bfa07fa6765 100644
--- a/icu4c/source/common/unicode/edits.h
+++ b/icu4c/source/common/unicode/edits.h
@@ -159,7 +159,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param outErrorCode Set to an error code if it does not contain one already
* and an error occurred while recording edits.
* Otherwise unchanged.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @stable ICU 59
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
@@ -171,7 +171,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
*/
int32_t lengthDelta() const { return delta; }
/**
- * @return TRUE if there are any change edits
+ * @return true if there are any change edits
* @stable ICU 59
*/
UBool hasChanges() const { return numChanges != 0; }
@@ -207,8 +207,8 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
*/
Iterator() :
array(nullptr), index(0), length(0),
- remaining(0), onlyChanges_(FALSE), coarse(FALSE),
- dir(0), changed(FALSE), oldLength_(0), newLength_(0),
+ remaining(0), onlyChanges_(false), coarse(false),
+ dir(0), changed(false), oldLength_(0), newLength_(0),
srcIndex(0), replIndex(0), destIndex(0) {}
/**
* Copy constructor.
@@ -226,7 +226,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return TRUE if there is another edit
+ * @return true if there is another edit
* @stable ICU 59
*/
UBool next(UErrorCode &errorCode) { return next(onlyChanges_, errorCode); }
@@ -247,11 +247,11 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return TRUE if the edit for the source index was found
+ * @return true if the edit for the source index was found
* @stable ICU 59
*/
UBool findSourceIndex(int32_t i, UErrorCode &errorCode) {
- return findIndex(i, TRUE, errorCode) == 0;
+ return findIndex(i, true, errorCode) == 0;
}
/**
@@ -270,11 +270,11 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @param errorCode ICU error code. Its input value must pass the U_SUCCESS() test,
* or else the function returns immediately. Check for U_FAILURE()
* on output or use with function chaining. (See User Guide for details.)
- * @return TRUE if the edit for the destination index was found
+ * @return true if the edit for the destination index was found
* @stable ICU 60
*/
UBool findDestinationIndex(int32_t i, UErrorCode &errorCode) {
- return findIndex(i, FALSE, errorCode) == 0;
+ return findIndex(i, false, errorCode) == 0;
}
/**
@@ -328,8 +328,8 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
/**
* Returns whether the edit currently represented by the iterator is a change edit.
*
- * @return TRUE if this edit replaces oldLength() units with newLength() different ones.
- * FALSE if oldLength units remain unchanged.
+ * @return true if this edit replaces oldLength() units with newLength() different ones.
+ * false if oldLength units remain unchanged.
* @stable ICU 59
*/
UBool hasChange() const { return changed; }
@@ -347,8 +347,8 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* {@link #destinationIndex}, or in the replacement string, which starts at
* {@link #replacementIndex}.
*
- * @return the number of units in the modified string, if hasChange() is TRUE.
- * Same as oldLength if hasChange() is FALSE.
+ * @return the number of units in the modified string, if hasChange() is true.
+ * Same as oldLength if hasChange() is false.
* @stable ICU 59
*/
int32_t newLength() const { return newLength_; }
@@ -436,7 +436,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getCoarseChangesIterator() const {
- return Iterator(array, length, TRUE, TRUE);
+ return Iterator(array, length, true, true);
}
/**
@@ -448,7 +448,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getCoarseIterator() const {
- return Iterator(array, length, FALSE, TRUE);
+ return Iterator(array, length, false, true);
}
/**
@@ -460,7 +460,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getFineChangesIterator() const {
- return Iterator(array, length, TRUE, FALSE);
+ return Iterator(array, length, true, false);
}
/**
@@ -471,7 +471,7 @@ class U_COMMON_API Edits U_FINAL : public UMemory {
* @stable ICU 59
*/
Iterator getFineIterator() const {
- return Iterator(array, length, FALSE, FALSE);
+ return Iterator(array, length, false, false);
}
/**
diff --git a/icu4c/source/common/unicode/filteredbrk.h b/icu4c/source/common/unicode/filteredbrk.h
index 42936763259..8b07e39ae12 100644
--- a/icu4c/source/common/unicode/filteredbrk.h
+++ b/icu4c/source/common/unicode/filteredbrk.h
@@ -85,8 +85,8 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* by the iterator.
* @param string the string to suppress, such as "Mr."
* @param status error code
- * @return returns TRUE if the string was not present and now added,
- * FALSE if the call was a no-op because the string was already being suppressed.
+ * @return returns true if the string was not present and now added,
+ * false if the call was a no-op because the string was already being suppressed.
* @stable ICU 56
*/
virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
@@ -98,8 +98,8 @@ class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
* locale data which may be suppressing certain strings.
* @param string the exception to remove
* @param status error code
- * @return returns TRUE if the string was present and now removed,
- * FALSE if the call was a no-op because the string was not being suppressed.
+ * @return returns true if the string was present and now removed,
+ * false if the call was a no-op because the string was not being suppressed.
* @stable ICU 56
*/
virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
diff --git a/icu4c/source/common/unicode/idna.h b/icu4c/source/common/unicode/idna.h
index 6dfcfe48db2..1305dc60484 100644
--- a/icu4c/source/common/unicode/idna.h
+++ b/icu4c/source/common/unicode/idna.h
@@ -95,7 +95,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a single domain name label into its ASCII form for DNS lookup.
- * If any processing step fails, then info.hasErrors() will be TRUE and
+ * If any processing step fails, then info.hasErrors() will be true and
* the result might not be an ASCII string.
* The label might be modified according to the types of errors.
* Labels with severe errors will be left in (or turned into) their Unicode form.
@@ -119,7 +119,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a single domain name label into its Unicode form for human-readable display.
- * If any processing step fails, then info.hasErrors() will be TRUE.
+ * If any processing step fails, then info.hasErrors() will be true.
* The label might be modified according to the types of errors.
*
* The UErrorCode indicates an error only in exceptional cases,
@@ -141,7 +141,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a whole domain name into its ASCII form for DNS lookup.
- * If any processing step fails, then info.hasErrors() will be TRUE and
+ * If any processing step fails, then info.hasErrors() will be true and
* the result might not be an ASCII string.
* The domain name might be modified according to the types of errors.
* Labels with severe errors will be left in (or turned into) their Unicode form.
@@ -165,7 +165,7 @@ class U_COMMON_API IDNA : public UObject {
/**
* Converts a whole domain name into its Unicode form for human-readable display.
- * If any processing step fails, then info.hasErrors() will be TRUE.
+ * If any processing step fails, then info.hasErrors() will be true.
* The domain name might be modified according to the types of errors.
*
* The UErrorCode indicates an error only in exceptional cases,
@@ -273,10 +273,10 @@ class U_COMMON_API IDNAInfo : public UMemory {
* Constructor for stack allocation.
* @stable ICU 4.6
*/
- IDNAInfo() : errors(0), labelErrors(0), isTransDiff(FALSE), isBiDi(FALSE), isOkBiDi(TRUE) {}
+ IDNAInfo() : errors(0), labelErrors(0), isTransDiff(false), isBiDi(false), isOkBiDi(true) {}
/**
* Were there IDNA processing errors?
- * @return TRUE if there were processing errors
+ * @return true if there were processing errors
* @stable ICU 4.6
*/
UBool hasErrors() const { return errors!=0; }
@@ -288,7 +288,7 @@ class U_COMMON_API IDNAInfo : public UMemory {
*/
uint32_t getErrors() const { return errors; }
/**
- * Returns TRUE if transitional and nontransitional processing produce different results.
+ * Returns true if transitional and nontransitional processing produce different results.
* This is the case when the input label or domain name contains
* one or more deviation characters outside a Punycode label (see UTS #46).
*
@@ -297,7 +297,7 @@ class U_COMMON_API IDNAInfo : public UMemory {
*
- * @return TRUE if transitional and nontransitional processing produce different results
+ * @return true if transitional and nontransitional processing produce different results
* @stable ICU 4.6
*/
UBool isTransitionalDifferent() const { return isTransDiff; }
@@ -310,9 +310,9 @@ class U_COMMON_API IDNAInfo : public UMemory {
void reset() {
errors=labelErrors=0;
- isTransDiff=FALSE;
- isBiDi=FALSE;
- isOkBiDi=TRUE;
+ isTransDiff=false;
+ isBiDi=false;
+ isOkBiDi=true;
}
uint32_t errors, labelErrors;
diff --git a/icu4c/source/common/unicode/localebuilder.h b/icu4c/source/common/unicode/localebuilder.h
index 52ac1e780b6..a3b919b38ad 100644
--- a/icu4c/source/common/unicode/localebuilder.h
+++ b/icu4c/source/common/unicode/localebuilder.h
@@ -286,7 +286,7 @@ class U_COMMON_API LocaleBuilder : public UObject {
* @param outErrorCode Set to an error code that occurred while setting subtags.
* Unchanged if there is no such error or if outErrorCode
* already contained an error.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @draft ICU 65
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
diff --git a/icu4c/source/common/unicode/localematcher.h b/icu4c/source/common/unicode/localematcher.h
index d9b798279dc..27d21231b39 100644
--- a/icu4c/source/common/unicode/localematcher.h
+++ b/icu4c/source/common/unicode/localematcher.h
@@ -512,7 +512,7 @@ class U_COMMON_API LocaleMatcher : public UMemory {
* @param outErrorCode Set to an error code if it does not contain one already
* and an error occurred while setting parameters.
* Otherwise unchanged.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @draft ICU 65
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const;
diff --git a/icu4c/source/common/unicode/localpointer.h b/icu4c/source/common/unicode/localpointer.h
index 61c3020918e..2a65f2d382d 100644
--- a/icu4c/source/common/unicode/localpointer.h
+++ b/icu4c/source/common/unicode/localpointer.h
@@ -88,13 +88,13 @@ class LocalPointerBase {
~LocalPointerBase() { /* delete ptr; */ }
/**
* NULL check.
- * @return TRUE if ==NULL
+ * @return true if ==NULL
* @stable ICU 4.4
*/
UBool isNull() const { return ptr==NULL; }
/**
* NULL check.
- * @return TRUE if !=NULL
+ * @return true if !=NULL
* @stable ICU 4.4
*/
UBool isValid() const { return ptr!=NULL; }
diff --git a/icu4c/source/common/unicode/locid.h b/icu4c/source/common/unicode/locid.h
index f955743bce4..4620b093f3c 100644
--- a/icu4c/source/common/unicode/locid.h
+++ b/icu4c/source/common/unicode/locid.h
@@ -253,7 +253,7 @@ class U_COMMON_API Locale : public UObject {
/**
* Construct a locale from language, country, variant.
* If an error occurs, then the constructed object will be "bogus"
- * (isBogus() will return TRUE).
+ * (isBogus() will return true).
*
* @param language Lowercase two-letter or three-letter ISO-639 code.
* This parameter can instead be an ICU style C locale (e.g. "en_US"),
@@ -799,14 +799,14 @@ class U_COMMON_API Locale : public UObject {
/**
* Returns whether this locale's script is written right-to-left.
* If there is no script subtag, then the likely script is used, see uloc_addLikelySubtags().
- * If no likely script is known, then FALSE is returned.
+ * If no likely script is known, then false is returned.
*
* A script is right-to-left according to the CLDR script metadata
* which corresponds to whether the script's letters have Bidi_Class=R or AL.
*
- * Returns TRUE for "ar" and "en-Hebr", FALSE for "zh" and "fa-Cyrl".
+ * Returns true for "ar" and "en-Hebr", false for "zh" and "fa-Cyrl".
*
- * @return TRUE if the locale's script is written right-to-left
+ * @return true if the locale's script is written right-to-left
* @stable ICU 54
*/
UBool isRightToLeft() const;
@@ -960,7 +960,7 @@ class U_COMMON_API Locale : public UObject {
/**
* Gets the bogus state. Locale object can be bogus if it doesn't exist
- * @return FALSE if it is a real locale, TRUE if it is a bogus locale
+ * @return false if it is a real locale, true if it is a bogus locale
* @stable ICU 2.1
*/
inline UBool isBogus(void) const;
@@ -1020,7 +1020,7 @@ class U_COMMON_API Locale : public UObject {
virtual ~Iterator();
/**
- * @return TRUE if next() can be called again.
+ * @return true if next() can be called again.
* @draft ICU 65
*/
virtual UBool hasNext() const = 0;
@@ -1051,7 +1051,7 @@ class U_COMMON_API Locale : public UObject {
RangeIterator(Iter begin, Iter end) : it_(begin), end_(end) {}
/**
- * @return TRUE if next() can be called again.
+ * @return true if next() can be called again.
* @draft ICU 65
*/
UBool hasNext() const override { return it_ != end_; }
@@ -1089,7 +1089,7 @@ class U_COMMON_API Locale : public UObject {
it_(begin), end_(end), converter_(converter) {}
/**
- * @return TRUE if next() can be called again.
+ * @return true if next() can be called again.
* @draft ICU 65
*/
UBool hasNext() const override { return it_ != end_; }
diff --git a/icu4c/source/common/unicode/messagepattern.h b/icu4c/source/common/unicode/messagepattern.h
index 04f00a8757d..98e7b70b1fc 100644
--- a/icu4c/source/common/unicode/messagepattern.h
+++ b/icu4c/source/common/unicode/messagepattern.h
@@ -265,7 +265,7 @@ typedef enum UMessagePatternArgType UMessagePatternArgType;
/**
* \def UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE
- * Returns TRUE if the argument type has a plural style part sequence and semantics,
+ * Returns true if the argument type has a plural style part sequence and semantics,
* for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL.
* @stable ICU 50
*/
@@ -523,14 +523,14 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* @param other another object to compare with.
- * @return TRUE if this object is equivalent to the other one.
+ * @return true if this object is equivalent to the other one.
* @stable ICU 4.8
*/
UBool operator==(const MessagePattern &other) const;
/**
* @param other another object to compare with.
- * @return FALSE if this object is equivalent to the other one.
+ * @return false if this object is equivalent to the other one.
* @stable ICU 4.8
*/
inline UBool operator!=(const MessagePattern &other) const {
@@ -564,7 +564,7 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* Does the parsed pattern have named arguments like {first_name}?
- * @return TRUE if the parsed pattern has at least one named argument.
+ * @return true if the parsed pattern has at least one named argument.
* @stable ICU 4.8
*/
UBool hasNamedArguments() const {
@@ -573,7 +573,7 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* Does the parsed pattern have numbered arguments like {2}?
- * @return TRUE if the parsed pattern has at least one numbered argument.
+ * @return true if the parsed pattern has at least one numbered argument.
* @stable ICU 4.8
*/
UBool hasNumberedArguments() const {
@@ -664,7 +664,7 @@ class U_COMMON_API MessagePattern : public UObject {
* Compares the part's substring with the input string s.
* @param part a part of this MessagePattern.
* @param s a string.
- * @return TRUE if getSubstring(part).equals(s).
+ * @return true if getSubstring(part).equals(s).
* @stable ICU 4.8
*/
UBool partSubstringMatches(const Part &part, const UnicodeString &s) const {
@@ -785,7 +785,7 @@ class U_COMMON_API MessagePattern : public UObject {
* Indicates whether the Part type has a numeric value.
* If so, then that numeric value can be retrieved via MessagePattern.getNumericValue().
* @param type The Part type to be tested.
- * @return TRUE if the Part type has a numeric value.
+ * @return true if the Part type has a numeric value.
* @stable ICU 4.8
*/
static UBool hasNumericValue(UMessagePatternPartType type) {
@@ -794,14 +794,14 @@ class U_COMMON_API MessagePattern : public UObject {
/**
* @param other another object to compare with.
- * @return TRUE if this object is equivalent to the other one.
+ * @return true if this object is equivalent to the other one.
* @stable ICU 4.8
*/
UBool operator==(const Part &other) const;
/**
* @param other another object to compare with.
- * @return FALSE if this object is equivalent to the other one.
+ * @return false if this object is equivalent to the other one.
* @stable ICU 4.8
*/
inline UBool operator!=(const Part &other) const {
@@ -869,7 +869,7 @@ class U_COMMON_API MessagePattern : public UObject {
* Parses a number from the specified message substring.
* @param start start index into the message string
* @param limit limit index into the message string, must be startfalse
, only canonical
* decomposition will be performed.
* @param options the optional features to be enabled (0 for no options)
* @param result The composed string (on output).
@@ -256,7 +256,7 @@ class U_COMMON_API Normalizer : public UObject {
*
* @param source the string to be decomposed.
* @param compat Perform compatibility decomposition.
- * If this argument is FALSE
, only canonical
+ * If this argument is false
, only canonical
* decomposition will be performed.
* @param options the optional features to be enabled (0 for no options)
* @param result The decomposed string (on output).
@@ -315,7 +315,7 @@ class U_COMMON_API Normalizer : public UObject {
* never a "maybe".
* For NFD, NFKD, and FCD, both functions work exactly the same.
* For NFC and NFKC where quickCheck may return "maybe", this function will
- * perform further tests to arrive at a TRUE/FALSE result.
+ * perform further tests to arrive at a true/false result.
*
* @param src String that is to be tested if it is in a normalization format.
* @param mode Which normalization form to test for.
@@ -577,7 +577,7 @@ class U_COMMON_API Normalizer : public UObject {
int32_t endIndex(void) const;
/**
- * Returns TRUE when both iterators refer to the same character in the same
+ * Returns true when both iterators refer to the same character in the same
* input text.
*
* @param that a Normalizer object to compare this one to
@@ -587,7 +587,7 @@ class U_COMMON_API Normalizer : public UObject {
UBool operator==(const Normalizer& that) const;
/**
- * Returns FALSE when both iterators refer to the same character in the same
+ * Returns false when both iterators refer to the same character in the same
* input text.
*
* @param that a Normalizer object to compare this one to
@@ -655,8 +655,8 @@ class U_COMMON_API Normalizer : public UObject {
* It is possible to specify multiple options that are all turned on or off.
*
* @param option the option(s) whose value is/are to be set.
- * @param value the new setting for the option. Use TRUE
to
- * turn the option(s) on and FALSE
to turn it/them off.
+ * @param value the new setting for the option. Use true
to
+ * turn the option(s) on and false
to turn it/them off.
*
* @see #getOption
* @deprecated ICU 56 Use Normalizer2 instead.
@@ -666,11 +666,11 @@ class U_COMMON_API Normalizer : public UObject {
/**
* Determine whether an option is turned on or off.
- * If multiple options are specified, then the result is TRUE if any
+ * If multiple options are specified, then the result is true if any
* of them are set.
* isInverse
set to TRUE
,
+ * isInverse
set to true
,
* this function changes the behavior of some of the subsequent functions
* in a way that they can be used for the inverse Bidi algorithm.
* Specifically, runs of text with numeric characters will be treated in a
@@ -610,12 +610,12 @@ U_NAMESPACE_END
* the runs of the logically ordered output.isInverse
set to
- * TRUE
is equivalent to calling
+ * true
is equivalent to calling
* ubidi_setReorderingMode
with argument
* reorderingMode
* set to #UBIDI_REORDER_INVERSE_NUMBERS_AS_L
.
* Calling this function with argument isInverse
set to
- * FALSE
is equivalent to calling
+ * false
is equivalent to calling
* ubidi_setReorderingMode
with argument
* reorderingMode
* set to #UBIDI_REORDER_DEFAULT
.
@@ -635,12 +635,12 @@ ubidi_setInverse(UBiDi *pBiDi, UBool isInverse);
/**
* Is this Bidi object set to perform the inverse Bidi algorithm?
* ubidi_setReorderingMode
will return TRUE
if the
+ * ubidi_setReorderingMode
will return true
if the
* reordering mode was set to #UBIDI_REORDER_INVERSE_NUMBERS_AS_L
,
- * FALSE
for all other values.false
for all other values.
UBiDi
object.
- * @return TRUE if the Bidi object is set to perform the inverse Bidi algorithm
+ * @return true if the Bidi object is set to perform the inverse Bidi algorithm
* by handling numbers as L.
*
* @see ubidi_setInverse
@@ -679,7 +679,7 @@ ubidi_orderParagraphsLTR(UBiDi *pBiDi, UBool orderParagraphsLTR);
* successive paragraphs progress from left to right?
*
* @param pBiDi is a UBiDi
object.
- * @return TRUE if the Bidi object is set to allocate level 0 to block
+ * @return true if the Bidi object is set to allocate level 0 to block
* separators.
*
* @see ubidi_orderParagraphsLTR
@@ -717,7 +717,7 @@ typedef enum UBiDiReorderingMode {
* @stable ICU 3.6 */
UBIDI_REORDER_RUNS_ONLY,
/** Visual to Logical algorithm which handles numbers like L
- * (same algorithm as selected by ubidi_setInverse(TRUE)
.
+ * (same algorithm as selected by ubidi_setInverse(true)
.
* @see ubidi_setInverse
* @stable ICU 3.6 */
UBIDI_REORDER_INVERSE_NUMBERS_AS_L,
@@ -836,7 +836,7 @@ typedef enum UBiDiReorderingMode {
* reordered sequence (the option #UBIDI_INSERT_LRM_FOR_NUMERIC
can
* be used with function ubidi_writeReordered
to this end. This
* mode is equivalent to calling ubidi_setInverse()
with
- * argument isInverse
set to TRUE
.
+ * argument isInverse
set to true
.
*
* #UBIDI_REORDER_INVERSE_LIKE_DIRECT
, the "direct" Logical to Visual
@@ -938,7 +938,7 @@ typedef enum UBiDiReorderingOption {
*
* If this option is set in conjunction with reordering mode
* #UBIDI_REORDER_INVERSE_NUMBERS_AS_L
or with calling
- * ubidi_setInverse(TRUE)
, it implies
+ * ubidi_setInverse(true)
, it implies
* option #UBIDI_INSERT_LRM_FOR_NUMERIC
* in calls to function ubidi_writeReordered()
.
When the UBIDI_OPTION_STREAMING
option is used,
* it is recommended to call ubidi_orderParagraphsLTR()
with
- * argument orderParagraphsLTR
set to TRUE
before
+ * argument orderParagraphsLTR
set to true
before
* calling ubidi_setPara
so that later paragraphs may be
* concatenated to previous paragraphs on the right.
ubidi_setPara
with
* paraLevel == UBIDI_DEFAULT_RTL
,ubidi_setInverse(UBiDi*, TRUE)
and then
+ * calling ubidi_setInverse(UBiDi*, true)
and then
* ubidi_setPara
with paraLevel == UBIDI_LTR
,ubidi_setInverse(UBiDi*, TRUE)
and then
+ * calling ubidi_setInverse(UBiDi*, true)
and then
* ubidi_setPara
with paraLevel == UBIDI_RTL
.UDataInfo
structure
* of data that has been loaded and will be returned
* by udata_openChoice()
if this function
- * returns TRUE
.
- * @return TRUE if the current data memory is acceptable
+ * returns true
.
+ * @return true if the current data memory is acceptable
* @stable ICU 2.0
*/
typedef UBool U_CALLCONV
@@ -242,7 +242,7 @@ udata_open(const char *path, const char *type, const char *name,
* This may be NULL
or empty.
* @param name A string that specifies the name of the data.
* @param isAcceptable This function is called to verify that loaded data
- * is useful for the client code. If it returns FALSE
+ * is useful for the client code. If it returns false
* for all data items, then udata_openChoice()
* will return with an error.
* @param context Arbitrary parameter to be passed into isAcceptable.
diff --git a/icu4c/source/common/unicode/uidna.h b/icu4c/source/common/unicode/uidna.h
index e789dca80de..ddd6f1bdc78 100644
--- a/icu4c/source/common/unicode/uidna.h
+++ b/icu4c/source/common/unicode/uidna.h
@@ -23,6 +23,7 @@
#if !UCONFIG_NO_IDNA
+#include
- * Note: When
- * If isString() == TRUE, the value is a
+ * If isString() == true, the value is a
* string, otherwise the value is a
* single code point. Elements of either type can be retrieved
* with the function getString(), while elements of
@@ -197,7 +197,7 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
/**
* Returns the next element in the set, either a code point range
* or a string. If there are no more elements in the set, return
- * false. If isString() == TRUE, the value is a
+ * false. If isString() == true, the value is a
* string and can be accessed with getString(). Otherwise the value is a
* range of one or more code points from getCodepoint() to
* getCodepointeEnd() inclusive.
@@ -205,7 +205,7 @@ class U_COMMON_API UnicodeSetIterator : public UObject {
* The order of iteration is all code points ranges in sorted
* order, followed by all strings sorted order. Ranges are
* disjoint and non-contiguous. The value returned from getString()
- * is undefined unless isString() == TRUE. Do not mix calls to
+ * is undefined unless isString() == true. Do not mix calls to
* next() and nextRange() without calling
* reset() between them. The results of doing so are
* undefined.
diff --git a/icu4c/source/common/unicode/ustring.h b/icu4c/source/common/unicode/ustring.h
index 245b766545a..8beb5fe4ecd 100644
--- a/icu4c/source/common/unicode/ustring.h
+++ b/icu4c/source/common/unicode/ustring.h
@@ -462,8 +462,8 @@ u_strcmpCodePointOrder(const UChar *s1, const UChar *s2);
* @param s2 Second source string.
* @param length2 Length of second source string, or -1 if NUL-terminated.
*
- * @param codePointOrder Choose between code unit order (FALSE)
- * and code point order (TRUE).
+ * @param codePointOrder Choose between code unit order (false)
+ * and code point order (true).
*
* @return <0 or 0 or >0 as usual for string comparisons
*
@@ -485,8 +485,8 @@ u_strCompare(const UChar *s1, int32_t length1,
*
* @param iter1 First source string iterator.
* @param iter2 Second source string iterator.
- * @param codePointOrder Choose between code unit order (FALSE)
- * and code point order (TRUE).
+ * @param codePointOrder Choose between code unit order (false)
+ * and code point order (true).
*
* @return <0 or 0 or >0 as usual for string comparisons
*
@@ -903,13 +903,13 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count);
*
* U_STRING_DECL(ustringVar1, "Quick-Fox 2", 11);
* U_STRING_DECL(ustringVar2, "jumps 5%", 8);
- * static UBool didInit=FALSE;
+ * static UBool didInit=false;
*
* int32_t function() {
* if(!didInit) {
* U_STRING_INIT(ustringVar1, "Quick-Fox 2", 11);
* U_STRING_INIT(ustringVar2, "jumps 5%", 8);
- * didInit=TRUE;
+ * didInit=true;
* }
* return u_strcmp(ustringVar1, ustringVar2);
* }
diff --git a/icu4c/source/common/unicode/utext.h b/icu4c/source/common/unicode/utext.h
index 37d71a31728..b801bdf67af 100644
--- a/icu4c/source/common/unicode/utext.h
+++ b/icu4c/source/common/unicode/utext.h
@@ -323,7 +323,7 @@ utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *s
* shallow clones provide some protection against errors of this type by
* disabling text modification via the cloned UText.
*
- * A shallow clone made with the readOnly parameter == FALSE will preserve the
+ * A shallow clone made with the readOnly parameter == false will preserve the
* utext_isWritable() state of the source object. Note, however, that
* write operations must be avoided while more than one UText exists that refer
* to the same underlying text.
@@ -339,8 +339,8 @@ utext_openCharacterIterator(UText *ut, icu::CharacterIterator *ci, UErrorCode *s
* If non-NULL, must refer to an already existing UText, which will then
* be reset to become the clone.
* @param src The UText to be cloned.
- * @param deep TRUE to request a deep clone, FALSE for a shallow clone.
- * @param readOnly TRUE to request that the cloned UText have read only access to the
+ * @param deep true to request a deep clone, false for a shallow clone.
+ * @param readOnly true to request that the cloned UText have read only access to the
* underlying text.
* @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR
@@ -357,11 +357,11 @@ utext_clone(UText *dest, const UText *src, UBool deep, UBool readOnly, UErrorCod
* Compare two UText objects for equality.
* UTexts are equal if they are iterating over the same text, and
* have the same iteration position within the text.
- * If either or both of the parameters are NULL, the comparison is FALSE.
+ * If either or both of the parameters are NULL, the comparison is false.
*
* @param a The first of the two UTexts to compare.
* @param b The other UText to be compared.
- * @return TRUE if the two UTexts are equal.
+ * @return true if the two UTexts are equal.
* @stable ICU 3.6
*/
U_STABLE UBool U_EXPORT2
@@ -389,7 +389,7 @@ U_STABLE int64_t U_EXPORT2
utext_nativeLength(UText *ut);
/**
- * Return TRUE if calculating the length of the text could be expensive.
+ * Return true if calculating the length of the text could be expensive.
* Finding the length of NUL terminated strings is considered to be expensive.
*
* Note that the value of this function may change
@@ -398,7 +398,7 @@ utext_nativeLength(UText *ut);
* be expensive to report it.
*
* @param ut the text to be accessed.
- * @return TRUE if determining the length of the text could be time consuming.
+ * @return true if determining the length of the text could be time consuming.
* @stable ICU 3.4
*/
U_STABLE UBool U_EXPORT2
@@ -584,7 +584,7 @@ utext_setNativeIndex(UText *ut, int64_t nativeIndex);
*
* @param ut the text to be accessed.
* @param delta the signed number of code points to move the iteration position.
- * @return TRUE if the position could be moved the requested number of positions while
+ * @return true if the position could be moved the requested number of positions while
* staying within the range [0 - text length].
* @stable ICU 3.4
*/
@@ -768,16 +768,16 @@ utext_extract(UText *ut,
/**
- * Return TRUE if the text can be written (modified) with utext_replace() or
+ * Return true if the text can be written (modified) with utext_replace() or
* utext_copy(). For the text to be writable, the text provider must
* be of a type that supports writing and the UText must not be frozen.
*
- * Attempting to modify text when utext_isWriteable() is FALSE will fail -
+ * Attempting to modify text when utext_isWriteable() is false will fail -
* the text will not be modified, and an error will be returned from the function
* that attempted the modification.
*
* @param ut the UText to be tested.
- * @return TRUE if the text is modifiable.
+ * @return true if the text is modifiable.
*
* @see utext_freeze()
* @see utext_replace()
@@ -794,7 +794,7 @@ utext_isWritable(const UText *ut);
* @see Replaceable::hasMetaData()
*
* @param ut The UText to be tested
- * @return TRUE if the underlying text includes meta data.
+ * @return true if the underlying text includes meta data.
* @stable ICU 3.4
*/
U_STABLE UBool U_EXPORT2
@@ -808,7 +808,7 @@ utext_hasMetaData(const UText *ut);
* newly inserted replacement text.
*
* This function is only available on UText types that support writing,
- * that is, ones where utext_isWritable() returns TRUE.
+ * that is, ones where utext_isWritable() returns true.
*
* When using this function, there should be only a single UText opened onto the
* underlying native text string. Behavior after a replace operation
@@ -850,7 +850,7 @@ utext_replace(UText *ut,
* at the destination position.
*
* This function is only available on UText types that support writing,
- * that is, ones where utext_isWritable() returns TRUE.
+ * that is, ones where utext_isWritable() returns true.
*
* When using this function, there should be only a single UText opened onto the
* underlying native text string. Behavior after a copy operation
@@ -863,7 +863,7 @@ utext_replace(UText *ut,
* to be copied.
* @param destIndex The native destination index to which the source substring is
* copied or moved.
- * @param move If TRUE, then the substring is moved, not copied/duplicated.
+ * @param move If true, then the substring is moved, not copied/duplicated.
* @param status receives any error status. Possible errors include U_NO_WRITE_PERMISSION
*
* @stable ICU 3.4
@@ -972,7 +972,7 @@ enum {
* @param dest A UText struct to be filled in with the result of the clone operation,
* or NULL if the clone function should heap-allocate a new UText struct.
* @param src The UText to be cloned.
- * @param deep TRUE to request a deep clone, FALSE for a shallow clone.
+ * @param deep true to request a deep clone, false for a shallow clone.
* @param status Errors are returned here. For deep clones, U_UNSUPPORTED_ERROR
* should be returned if the text provider is unable to clone the
* original text.
@@ -1008,9 +1008,9 @@ UTextNativeLength(UText *ut);
*
* @param ut the UText being accessed.
* @param nativeIndex Requested index of the text to be accessed.
- * @param forward If TRUE, then the returned chunk must contain text
+ * @param forward If true, then the returned chunk must contain text
* starting from the index, so that start<=index During formatting, a number is mapped to the first range
@@ -126,7 +126,7 @@ class MessageFormat;
* Here is an example of two arrays that map the number
* strict
is FALSE, any locale
+ * Note: When strict
is false, any locale
* fields which do not satisfy the BCP47 syntax requirement will
* be omitted from the result. When strict
is
- * TRUE, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
+ * true, this function sets U_ILLEGAL_ARGUMENT_ERROR to the
* err
if any locale fields do not satisfy the
* BCP47 syntax requirement.
* @param localeID the input locale ID
diff --git a/icu4c/source/common/unicode/umachine.h b/icu4c/source/common/unicode/umachine.h
index 1d85855ac9d..5b0659ac667 100644
--- a/icu4c/source/common/unicode/umachine.h
+++ b/icu4c/source/common/unicode/umachine.h
@@ -49,6 +49,7 @@
* ANSI C headers:
* stddef.h defines wchar_t
*/
+#include (number separator string)
in an equivalent pattern string.
- * closure[i]==TRUE
corresponds to a less_than
separator sign.
+ * closure[i]==true
corresponds to a less_than
separator sign.
* The equivalent pattern string will be constructed automatically.1..7
to the English day of the week abbreviations
* Sun..Sat
. No closures array is given; this is the same as
- * specifying all closures to be FALSE
.false
.
{1,2,3,4,5,6,7}, * {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"}@@ -138,7 +138,7 @@ class MessageFormat; * like the turned bracket in European notation: [-Inf, 1) == [-Inf, 1[ ) * *
{0, 1, 1}, - * {FALSE, FALSE, TRUE}, + * {false, false, true}, * {"no files", "one file", "many files"}* *
Here is an example that shows formatting and parsing:
@@ -189,7 +189,7 @@ class U_I18N_API ChoiceFormat: public NumberFormat { /** * Constructs a new ChoiceFormat with the given limits and message strings. - * All closure flags default toFALSE
,
+ * All closure flags default to false
,
* equivalent to less_than_or_equal
separators.
*
* Copies the limits and formats instead of adopting them.
@@ -210,9 +210,9 @@ class U_I18N_API ChoiceFormat: public NumberFormat {
*
* @param limits Array of limit values
* @param closures Array of booleans specifying whether each
- * element of 'limits' is open or closed. If FALSE, then the
+ * element of 'limits' is open or closed. If false, then the
* corresponding limit number is a member of its range.
- * If TRUE, then the limit number belongs to the previous range it.
+ * If true, then the limit number belongs to the previous range it.
* @param formats Array of formats
* @param count Size of 'limits', 'closures', and 'formats' arrays
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
@@ -568,13 +568,13 @@ class U_I18N_API ChoiceFormat: public NumberFormat {
* The intervals may be closed, half open, or open. This affects
* formatting but does not affect parsing. Interval i is affected
* by fClosures[i] and fClosures[i+1]. If fClosures[i]
- * is FALSE, then the value fChoiceLimits[i] is in interval i.
+ * is false, then the value fChoiceLimits[i] is in interval i.
* That is, intervals i and i are:
*
* i-1: ... x < fChoiceLimits[i]
* i: fChoiceLimits[i] <= x ...
*
- * If fClosures[i] is TRUE, then the value fChoiceLimits[i] is
+ * If fClosures[i] is true, then the value fChoiceLimits[i] is
* in interval i-1. That is, intervals i-1 and i are:
*
* i-1: ... x <= fChoiceLimits[i]
diff --git a/icu4c/source/i18n/unicode/coleitr.h b/icu4c/source/i18n/unicode/coleitr.h
index e3ec0e01a18..aa0b08f5e73 100644
--- a/icu4c/source/i18n/unicode/coleitr.h
+++ b/icu4c/source/i18n/unicode/coleitr.h
@@ -253,7 +253,7 @@ class U_I18N_API CollationElementIterator U_FINAL : public UObject {
/**
* Checks if a comparison order is ignorable.
* @param order the collation order.
- * @return TRUE if a character is ignorable, FALSE otherwise.
+ * @return true if a character is ignorable, false otherwise.
* @stable ICU 2.0
*/
static inline UBool isIgnorable(int32_t order);
diff --git a/icu4c/source/i18n/unicode/coll.h b/icu4c/source/i18n/unicode/coll.h
index f5564c73944..e69853167fc 100644
--- a/icu4c/source/i18n/unicode/coll.h
+++ b/icu4c/source/i18n/unicode/coll.h
@@ -236,21 +236,21 @@ class U_I18N_API Collator : public UObject {
// Collator public methods --------------------------------------------
/**
- * Returns TRUE if "other" is the same as "this".
+ * Returns true if "other" is the same as "this".
*
- * The base class implementation returns TRUE if "other" has the same type/class as "this":
+ * The base class implementation returns true if "other" has the same type/class as "this":
* `typeid(*this) == typeid(other)`.
*
* Subclass implementations should do something like the following:
*
- * if (this == &other) { return TRUE; }
- * if (!Collator::operator==(other)) { return FALSE; } // not the same class
+ * if (this == &other) { return true; }
+ * if (!Collator::operator==(other)) { return false; } // not the same class
*
* const MyCollator &o = (const MyCollator&)other;
* (compare this vs. o's subclass fields)
*
* @param other Collator object to be compared
- * @return TRUE if other is the same as this.
+ * @return true if other is the same as this.
* @stable ICU 2.0
*/
virtual UBool operator==(const Collator& other) const;
@@ -259,7 +259,7 @@ class U_I18N_API Collator : public UObject {
* Returns true if "other" is not the same as "this".
* Calls ! operator==(const Collator&) const which works for all subclasses.
* @param other Collator object to be compared
- * @return TRUE if other is not the same as this.
+ * @return true if other is not the same as this.
* @stable ICU 2.0
*/
virtual UBool operator!=(const Collator& other) const;
@@ -841,7 +841,7 @@ class U_I18N_API Collator : public UObject {
* Collator::createInstance to avoid undefined behavior.
* @param key the registry key returned by a previous call to registerInstance
* @param status the in/out status code, no special meanings are assigned
- * @return TRUE if the collator for the key was successfully unregistered
+ * @return true if the collator for the key was successfully unregistered
* @stable ICU 2.6
*/
static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status);
diff --git a/icu4c/source/i18n/unicode/curramt.h b/icu4c/source/i18n/unicode/curramt.h
index 5cfe1cf75e6..e4c35c18111 100644
--- a/icu4c/source/i18n/unicode/curramt.h
+++ b/icu4c/source/i18n/unicode/curramt.h
@@ -41,7 +41,7 @@ class U_I18N_API CurrencyAmount: public Measure {
/**
* Construct an object with the given numeric amount and the given
* ISO currency code.
- * @param amount a numeric object; amount.isNumeric() must be TRUE
+ * @param amount a numeric object; amount.isNumeric() must be true
* @param isoCode the 3-letter ISO 4217 currency code; must not be
* NULL and must have length 3
* @param ec input-output error code. If the amount or the isoCode
diff --git a/icu4c/source/i18n/unicode/dcfmtsym.h b/icu4c/source/i18n/unicode/dcfmtsym.h
index 582e7533a4a..b2c39a0236e 100644
--- a/icu4c/source/i18n/unicode/dcfmtsym.h
+++ b/icu4c/source/i18n/unicode/dcfmtsym.h
@@ -378,7 +378,7 @@ class U_I18N_API DecimalFormatSymbols : public UObject {
* back to the locale.
*/
void initialize(const Locale& locale, UErrorCode& success,
- UBool useLastResortData = FALSE, const NumberingSystem* ns = nullptr);
+ UBool useLastResortData = false, const NumberingSystem* ns = nullptr);
/**
* Initialize the symbols with default values.
@@ -543,12 +543,12 @@ inline const UnicodeString& DecimalFormatSymbols::getConstDigitSymbol(int32_t di
// -------------------------------------
inline void
-DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits = TRUE) {
+DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propagateDigits = true) {
if (symbol == kCurrencySymbol) {
- fIsCustomCurrencySymbol = TRUE;
+ fIsCustomCurrencySymbol = true;
}
else if (symbol == kIntlCurrencySymbol) {
- fIsCustomIntlCurrencySymbol = TRUE;
+ fIsCustomIntlCurrencySymbol = true;
}
if(symbol'@'
pattern character. Alternatively,
- * call setSignificantDigitsUsed(TRUE).
+ * call setSignificantDigitsUsed(true).
*
* '@'
pattern
- * character. Alternatively, call setSignificantDigitsUsed(FALSE).
+ * character. Alternatively, call setSignificantDigitsUsed(false).
*
* min
, then it is set to min
.
* This function also enables the use of significant digits
- * by this formatter - areSignificantDigitsUsed() will return TRUE.
+ * by this formatter - areSignificantDigitsUsed() will return true.
* @see #areSignificantDigitsUsed
* @param min the fewest significant digits to be shown
* @stable ICU 3.0
@@ -1982,7 +1982,7 @@ class U_I18N_API DecimalFormat : public NumberFormat {
* to one. If the minimum significant digits count is greater
* than max
, then it is set to max
.
* This function also enables the use of significant digits
- * by this formatter - areSignificantDigitsUsed() will return TRUE.
+ * by this formatter - areSignificantDigitsUsed() will return true.
* @see #areSignificantDigitsUsed
* @param max the most significant digits to be shown
* @stable ICU 3.0
diff --git a/icu4c/source/i18n/unicode/dtfmtsym.h b/icu4c/source/i18n/unicode/dtfmtsym.h
index c6d76fe98eb..69f9f9759ec 100644
--- a/icu4c/source/i18n/unicode/dtfmtsym.h
+++ b/icu4c/source/i18n/unicode/dtfmtsym.h
@@ -919,7 +919,8 @@ class U_I18N_API DateFormatSymbols U_FINAL : public UObject {
* failure code upon return.
* @param useLastResortData determine if use last resort data
*/
- void initializeData(const Locale& locale, const char *type, UErrorCode& status, UBool useLastResortData = FALSE);
+ void initializeData(const Locale& locale, const char *type,
+ UErrorCode& status, UBool useLastResortData = false);
/**
* Copy or alias an array in another object, as appropriate.
@@ -983,12 +984,12 @@ class U_I18N_API DateFormatSymbols U_FINAL : public UObject {
static UDateFormatField U_EXPORT2 getPatternCharIndex(char16_t c);
/**
- * Returns TRUE if f (with its pattern character repeated count times) is a numeric field.
+ * Returns true if f (with its pattern character repeated count times) is a numeric field.
*/
static UBool U_EXPORT2 isNumericField(UDateFormatField f, int32_t count);
/**
- * Returns TRUE if c (repeated count times) is the pattern character for a numeric field.
+ * Returns true if c (repeated count times) is the pattern character for a numeric field.
*/
static UBool U_EXPORT2 isNumericPatternChar(char16_t c, int32_t count);
public:
diff --git a/icu4c/source/i18n/unicode/dtitvfmt.h b/icu4c/source/i18n/unicode/dtitvfmt.h
index f05110690e5..3ff0affbc8a 100644
--- a/icu4c/source/i18n/unicode/dtitvfmt.h
+++ b/icu4c/source/i18n/unicode/dtitvfmt.h
@@ -796,7 +796,7 @@ class U_I18N_API DateIntervalFormat : public Format {
* to be formatted into date interval string
* @param toCalendar calendar set to the to date in date interval
* to be formatted into date interval string
- * @param fromToOnSameDay TRUE iff from and to dates are on the same day
+ * @param fromToOnSameDay true iff from and to dates are on the same day
* (any difference is in ampm/hours or below)
* @param appendTo Output parameter to receive result.
* Result is appended to existing contents.
@@ -932,8 +932,8 @@ class U_I18N_API DateIntervalFormat : public Format {
* @param dateSkeleton normalized date skeleton
* @param timeSkeleton normalized time skeleton
* @return whether the resource is found for the skeleton.
- * TRUE if interval pattern found for the skeleton,
- * FALSE otherwise.
+ * true if interval pattern found for the skeleton,
+ * false otherwise.
*/
UBool setSeparateDateTimePtn(const UnicodeString& dateSkeleton,
const UnicodeString& timeSkeleton);
@@ -961,8 +961,8 @@ class U_I18N_API DateIntervalFormat : public Format {
* @param extendedBestSkeleton extended best match skeleton
* @return whether the interval pattern is found
* through extending skeleton or not.
- * TRUE if interval pattern is found by
- * extending skeleton, FALSE otherwise.
+ * true if interval pattern is found by
+ * extending skeleton, false otherwise.
*/
UBool setIntervalPattern(UCalendarDateFields field,
const UnicodeString* skeleton,
diff --git a/icu4c/source/i18n/unicode/dtitvinf.h b/icu4c/source/i18n/unicode/dtitvinf.h
index 68bfa4352a6..3b260851873 100644
--- a/icu4c/source/i18n/unicode/dtitvinf.h
+++ b/icu4c/source/i18n/unicode/dtitvinf.h
@@ -307,8 +307,8 @@ class U_I18N_API DateIntervalInfo U_FINAL : public UObject {
/** Get default order -- whether the first date in pattern is later date
or not.
- * return default date ordering in interval pattern. TRUE if the first date
- * in pattern is later date, FALSE otherwise.
+ * return default date ordering in interval pattern. true if the first date
+ * in pattern is later date, false otherwise.
* @stable ICU 4.0
*/
UBool getDefaultOrder() const;
diff --git a/icu4c/source/i18n/unicode/fieldpos.h b/icu4c/source/i18n/unicode/fieldpos.h
index 23ee38624b7..ea0a23b13ec 100644
--- a/icu4c/source/i18n/unicode/fieldpos.h
+++ b/icu4c/source/i18n/unicode/fieldpos.h
@@ -161,7 +161,7 @@ class U_I18N_API FieldPosition : public UObject {
/**
* Equality operator.
* @param that the object to be compared with.
- * @return TRUE if the two field positions are equal, FALSE otherwise.
+ * @return true if the two field positions are equal, false otherwise.
* @stable ICU 2.0
*/
UBool operator==(const FieldPosition& that) const;
@@ -169,7 +169,7 @@ class U_I18N_API FieldPosition : public UObject {
/**
* Equality operator.
* @param that the object to be compared with.
- * @return TRUE if the two field positions are not equal, FALSE otherwise.
+ * @return true if the two field positions are not equal, false otherwise.
* @stable ICU 2.0
*/
UBool operator!=(const FieldPosition& that) const;
diff --git a/icu4c/source/i18n/unicode/fmtable.h b/icu4c/source/i18n/unicode/fmtable.h
index 7bec4f6906e..3a090393ac4 100644
--- a/icu4c/source/i18n/unicode/fmtable.h
+++ b/icu4c/source/i18n/unicode/fmtable.h
@@ -179,7 +179,7 @@ class U_I18N_API Formattable : public UObject {
/**
* Equality comparison.
* @param other the object to be compared with.
- * @return TRUE if other are equal to this, FALSE otherwise.
+ * @return true if other are equal to this, false otherwise.
* @stable ICU 2.0
*/
UBool operator==(const Formattable &other) const;
@@ -187,7 +187,7 @@ class U_I18N_API Formattable : public UObject {
/**
* Equality operator.
* @param other the object to be compared with.
- * @return TRUE if other are unequal to this, FALSE otherwise.
+ * @return true if other are unequal to this, false otherwise.
* @stable ICU 2.0
*/
UBool operator!=(const Formattable& other) const
@@ -277,9 +277,9 @@ class U_I18N_API Formattable : public UObject {
Type getType(void) const;
/**
- * Returns TRUE if the data type of this Formattable object
+ * Returns true if the data type of this Formattable object
* is kDouble, kLong, or kInt64
- * @return TRUE if this is a pure numeric object
+ * @return true if this is a pure numeric object
* @stable ICU 3.0
*/
UBool isNumeric() const;
diff --git a/icu4c/source/i18n/unicode/formattedvalue.h b/icu4c/source/i18n/unicode/formattedvalue.h
index e7ba4ec2459..5febea06618 100644
--- a/icu4c/source/i18n/unicode/formattedvalue.h
+++ b/icu4c/source/i18n/unicode/formattedvalue.h
@@ -116,7 +116,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
* Gets the field category for the current position.
*
* The return value is well-defined only after
- * FormattedValue#nextPosition returns TRUE.
+ * FormattedValue#nextPosition returns true.
*
* @return The field category saved in the instance.
* @stable ICU 64
@@ -129,7 +129,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
* Gets the field for the current position.
*
* The return value is well-defined only after
- * FormattedValue#nextPosition returns TRUE.
+ * FormattedValue#nextPosition returns true.
*
* @return The field saved in the instance.
* @stable ICU 64
@@ -141,7 +141,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
/**
* Gets the INCLUSIVE start index for the current position.
*
- * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+ * The return value is well-defined only after FormattedValue#nextPosition returns true.
*
* @return The start index saved in the instance.
* @stable ICU 64
@@ -153,7 +153,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory {
/**
* Gets the EXCLUSIVE end index stored for the current position.
*
- * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+ * The return value is well-defined only after FormattedValue#nextPosition returns true.
*
* @return The end index saved in the instance.
* @stable ICU 64
@@ -301,8 +301,8 @@ class U_I18N_API FormattedValue /* not : public UObject because this is an inter
* see ConstrainedFieldPosition#constrainCategory
* and ConstrainedFieldPosition#constrainField.
* @param status Set if an error occurs.
- * @return TRUE if a new occurrence of the field was found;
- * FALSE otherwise or if an error was set.
+ * @return true if a new occurrence of the field was found;
+ * false otherwise or if an error was set.
*
* @stable ICU 64
*/
diff --git a/icu4c/source/i18n/unicode/fpositer.h b/icu4c/source/i18n/unicode/fpositer.h
index 3e8a0108f16..87e811ea232 100644
--- a/icu4c/source/i18n/unicode/fpositer.h
+++ b/icu4c/source/i18n/unicode/fpositer.h
@@ -96,7 +96,7 @@ class U_I18N_API FieldPositionIterator : public UObject {
/**
* If the current position is valid, updates the FieldPosition values, advances the iterator,
- * and returns TRUE, otherwise returns FALSE.
+ * and returns true, otherwise returns false.
* @stable ICU 4.4
*/
UBool next(FieldPosition& fp);
diff --git a/icu4c/source/i18n/unicode/gregocal.h b/icu4c/source/i18n/unicode/gregocal.h
index 4ce40daf3a4..e5e6df17fda 100644
--- a/icu4c/source/i18n/unicode/gregocal.h
+++ b/icu4c/source/i18n/unicode/gregocal.h
@@ -344,7 +344,7 @@ class U_I18N_API GregorianCalendar: public Calendar {
UBool isLeapYear(int32_t year) const;
/**
- * Returns TRUE if the given Calendar object is equivalent to this
+ * Returns true if the given Calendar object is equivalent to this
* one. Calendar override.
*
* @param other the Calendar to be compared with this Calendar
@@ -756,7 +756,7 @@ class U_I18N_API GregorianCalendar: public Calendar {
public: // internal implementation
/**
- * @return TRUE if this calendar has the notion of a default century
+ * @return true if this calendar has the notion of a default century
* @internal
*/
virtual UBool haveDefaultCentury() const;
diff --git a/icu4c/source/i18n/unicode/measfmt.h b/icu4c/source/i18n/unicode/measfmt.h
index b4f90486294..2155ad531aa 100644
--- a/icu4c/source/i18n/unicode/measfmt.h
+++ b/icu4c/source/i18n/unicode/measfmt.h
@@ -309,7 +309,7 @@ class U_I18N_API MeasureFormat : public Format {
/**
* ICU use only.
* Allows subclass to change locale. Note that this method also changes
- * the NumberFormat object. Returns TRUE if locale changed; FALSE if no
+ * the NumberFormat object. Returns true if locale changed; false if no
* change was made.
* @internal.
*/
diff --git a/icu4c/source/i18n/unicode/measure.h b/icu4c/source/i18n/unicode/measure.h
index fa9c29351e3..aeb1dace43d 100644
--- a/icu4c/source/i18n/unicode/measure.h
+++ b/icu4c/source/i18n/unicode/measure.h
@@ -48,7 +48,7 @@ class U_I18N_API Measure: public UObject {
* Construct an object with the given numeric amount and the given
* unit. After this call, the caller must not delete the given
* unit object.
- * @param number a numeric object; amount.isNumeric() must be TRUE
+ * @param number a numeric object; amount.isNumeric() must be true
* @param adoptedUnit the unit object, which must not be NULL
* @param ec input-output error code. If the amount or the unit
* is invalid, then this will be set to a failing value.
diff --git a/icu4c/source/i18n/unicode/msgfmt.h b/icu4c/source/i18n/unicode/msgfmt.h
index 99b0eaeec1d..5f19d3ef73c 100644
--- a/icu4c/source/i18n/unicode/msgfmt.h
+++ b/icu4c/source/i18n/unicode/msgfmt.h
@@ -920,7 +920,7 @@ class U_I18N_API MessageFormat : public Format {
int32_t argTypeCapacity;
/**
- * TRUE if there are different argTypes for the same argument.
+ * true if there are different argTypes for the same argument.
* This only matters when the MessageFormat is used in the plain C (umsg_xxx) API
* where the pattern argTypes determine how the va_arg list is read.
*/
diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h
index 6ac33b47878..50da816f355 100644
--- a/icu4c/source/i18n/unicode/numberformatter.h
+++ b/icu4c/source/i18n/unicode/numberformatter.h
@@ -372,9 +372,9 @@ class U_I18N_API Notation : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fType == NTN_ERROR) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// To allow MacroProps to initialize empty instances:
@@ -726,9 +726,9 @@ class U_I18N_API Precision : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fType == RND_ERROR) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// On the parent type so that this method can be called internally on Precision instances.
@@ -970,9 +970,9 @@ class U_I18N_API IntegerWidth : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fHasError) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void apply(impl::DecimalQuantity &quantity, UErrorCode &status) const;
@@ -1098,9 +1098,9 @@ class U_I18N_API Scale : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fError != U_ZERO_ERROR) {
status = fError;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void applyTo(impl::DecimalQuantity& quantity) const;
@@ -1193,12 +1193,12 @@ class U_I18N_API SymbolsWrapper : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fType == SYMPTR_DFS && fPtr.dfs == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return TRUE;
+ return true;
} else if (fType == SYMPTR_NS && fPtr.ns == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
private:
@@ -1342,9 +1342,9 @@ class U_I18N_API Padder : public UMemory {
UBool copyErrorTo(UErrorCode &status) const {
if (fWidth == -3) {
status = fUnion.errorCode;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool isValid() const {
@@ -2121,13 +2121,13 @@ class U_I18N_API NumberFormatterSettings {
/**
* Sets the UErrorCode if an error occurred in the fluent chain.
* Preserves older error codes in the outErrorCode.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @stable ICU 60
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
// Do not overwrite the older error code
- return TRUE;
+ return true;
}
fMacros.copyErrorTo(outErrorCode);
return U_FAILURE(outErrorCode);
diff --git a/icu4c/source/i18n/unicode/numberrangeformatter.h b/icu4c/source/i18n/unicode/numberrangeformatter.h
index bfbf27468f0..1d1426ba812 100644
--- a/icu4c/source/i18n/unicode/numberrangeformatter.h
+++ b/icu4c/source/i18n/unicode/numberrangeformatter.h
@@ -354,13 +354,13 @@ class U_I18N_API NumberRangeFormatterSettings {
/**
* Sets the UErrorCode if an error occurred in the fluent chain.
* Preserves older error codes in the outErrorCode.
- * @return TRUE if U_FAILURE(outErrorCode)
+ * @return true if U_FAILURE(outErrorCode)
* @stable ICU 63
*/
UBool copyErrorTo(UErrorCode &outErrorCode) const {
if (U_FAILURE(outErrorCode)) {
// Do not overwrite the older error code
- return TRUE;
+ return true;
}
fMacros.copyErrorTo(outErrorCode);
return U_FAILURE(outErrorCode);
diff --git a/icu4c/source/i18n/unicode/numfmt.h b/icu4c/source/i18n/unicode/numfmt.h
index 48a69de7e73..9fcc689c7de 100644
--- a/icu4c/source/i18n/unicode/numfmt.h
+++ b/icu4c/source/i18n/unicode/numfmt.h
@@ -704,8 +704,8 @@ class U_I18N_API NumberFormat : public Format {
/**
* Sets whether lenient parsing should be enabled (it is off by default).
*
- * @param enable \c TRUE if lenient parsing should be used,
- * \c FALSE otherwise.
+ * @param enable \c true if lenient parsing should be used,
+ * \c false otherwise.
* @stable ICU 4.8
*/
virtual void setLenient(UBool enable);
@@ -713,8 +713,8 @@ class U_I18N_API NumberFormat : public Format {
/**
* Returns whether lenient parsing is enabled (it is off by default).
*
- * @return \c TRUE if lenient parsing is enabled,
- * \c FALSE otherwise.
+ * @return \c true if lenient parsing is enabled,
+ * \c false otherwise.
* @see #setLenient
* @stable ICU 4.8
*/
@@ -870,7 +870,7 @@ class U_I18N_API NumberFormat : public Format {
* NumberFormat::createInstance to avoid undefined behavior.
* @param key the registry key returned by a previous call to registerFactory
* @param status the in/out status code, no special meanings are assigned
- * @return TRUE if the factory for the key was successfully unregistered
+ * @return true if the factory for the key was successfully unregistered
* @stable ICU 2.6
*/
static UBool U_EXPORT2 unregister(URegistryKey key, UErrorCode& status);
@@ -1112,7 +1112,7 @@ class U_I18N_API NumberFormat : public Format {
#ifndef U_HIDE_INTERNAL_API
/**
* Creates the specified number format style of the desired locale.
- * If mustBeDecimalFormat is TRUE, then the returned pointer is
+ * If mustBeDecimalFormat is true, then the returned pointer is
* either a DecimalFormat or it is NULL.
* @internal
*/
@@ -1151,7 +1151,7 @@ class U_I18N_API NumberFormat : public Format {
private:
UBool fParseIntegerOnly;
- UBool fLenient; // TRUE => lenient parse is enabled
+ UBool fLenient; // true => lenient parse is enabled
// ISO currency code
char16_t fCurrency[4];
@@ -1228,7 +1228,7 @@ class U_I18N_API SimpleNumberFormatFactory : public NumberFormatFactory {
/**
* @stable ICU 2.6
*/
- SimpleNumberFormatFactory(const Locale& locale, UBool visible = TRUE);
+ SimpleNumberFormatFactory(const Locale& locale, UBool visible = true);
/**
* @stable ICU 3.0
diff --git a/icu4c/source/i18n/unicode/numsys.h b/icu4c/source/i18n/unicode/numsys.h
index 7def7032e1b..1646729777f 100644
--- a/icu4c/source/i18n/unicode/numsys.h
+++ b/icu4c/source/i18n/unicode/numsys.h
@@ -102,7 +102,7 @@ class U_I18N_API NumberingSystem : public UObject {
/**
* Create a numbering system using the specified radix, type, and description.
* @param radix The radix (base) for this numbering system.
- * @param isAlgorithmic TRUE if the numbering system is algorithmic rather than numeric.
+ * @param isAlgorithmic true if the numbering system is algorithmic rather than numeric.
* @param description The string representing the set of digits used in a numeric system, or the name of the RBNF
* ruleset to be used in an algorithmic system.
* @param status ICU status
@@ -171,10 +171,10 @@ class U_I18N_API NumberingSystem : public UObject {
/**
- * Returns TRUE if the given numbering system is algorithmic
+ * Returns true if the given numbering system is algorithmic
*
- * @return TRUE if the numbering system is algorithmic.
- * Otherwise, return FALSE.
+ * @return true if the numbering system is algorithmic.
+ * Otherwise, return false.
* @stable ICU 4.2
*/
UBool isAlgorithmic() const;
diff --git a/icu4c/source/i18n/unicode/plurrule.h b/icu4c/source/i18n/unicode/plurrule.h
index 408efbcc4a8..a92d4cbfece 100644
--- a/icu4c/source/i18n/unicode/plurrule.h
+++ b/icu4c/source/i18n/unicode/plurrule.h
@@ -447,12 +447,12 @@ class U_I18N_API PluralRules : public UObject {
UErrorCode& status);
/**
- * Returns TRUE if the given keyword is defined in this
+ * Returns true if the given keyword is defined in this
* PluralRules
object.
*
* @param keyword the input keyword.
- * @return TRUE if the input keyword is defined.
- * Otherwise, return FALSE.
+ * @return true if the input keyword is defined.
+ * Otherwise, return false.
* @stable ICU 4.0
*/
UBool isKeyword(const UnicodeString& keyword) const;
diff --git a/icu4c/source/i18n/unicode/rbtz.h b/icu4c/source/i18n/unicode/rbtz.h
index d66e1f08ec8..d481e9bf399 100644
--- a/icu4c/source/i18n/unicode/rbtz.h
+++ b/icu4c/source/i18n/unicode/rbtz.h
@@ -258,7 +258,7 @@ class U_I18N_API RuleBasedTimeZone : public BasicTimeZone {
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
@@ -268,7 +268,7 @@ class U_I18N_API RuleBasedTimeZone : public BasicTimeZone {
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
diff --git a/icu4c/source/i18n/unicode/regex.h b/icu4c/source/i18n/unicode/regex.h
index 7f7d1522804..98ef6a749fe 100644
--- a/icu4c/source/i18n/unicode/regex.h
+++ b/icu4c/source/i18n/unicode/regex.h
@@ -116,7 +116,7 @@ class U_I18N_API RegexPattern U_FINAL : public UObject {
* were constructed from identical source patterns using the same #URegexpFlag
* settings.
* @param that a RegexPattern object to compare with "this".
- * @return TRUE if the objects are equivalent.
+ * @return true if the objects are equivalent.
* @stable ICU 2.4
*/
UBool operator==(const RegexPattern& that) const;
@@ -126,7 +126,7 @@ class U_I18N_API RegexPattern U_FINAL : public UObject {
* were constructed from identical source patterns using the same #URegexpFlag
* settings.
* @param that a RegexPattern object to compare with "this".
- * @return TRUE if the objects are different.
+ * @return true if the objects are different.
* @stable ICU 2.4
*/
inline UBool operator!=(const RegexPattern& that) const {return ! operator ==(that);}
@@ -764,7 +764,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
/**
* Attempts to match the entire input region against the pattern.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 2.4
*/
virtual UBool matches(UErrorCode &status);
@@ -777,7 +777,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
* A successful match must extend to the end of the input.
* @param startIndex The input string (native) index at which to begin matching.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 2.8
*/
virtual UBool matches(int64_t startIndex, UErrorCode &status);
@@ -793,7 +793,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
* end(), and group() functions.
*
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match at the start of the input string.
+ * @return true if there is a match at the start of the input string.
* @stable ICU 2.4
*/
virtual UBool lookingAt(UErrorCode &status);
@@ -809,7 +809,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
*
* @param startIndex The input string (native) index at which to begin matching.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match.
+ * @return true if there is a match.
* @stable ICU 2.8
*/
virtual UBool lookingAt(int64_t startIndex, UErrorCode &status);
@@ -824,7 +824,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
* Note that if the input string is changed by the application,
* use find(startPos, status) instead of find(), because the saved starting
* position may not be valid with the altered input string.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 2.4
*/
virtual UBool find();
@@ -841,7 +841,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
* use find(startPos, status) instead of find(), because the saved starting
* position may not be valid with the altered input string.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 55
*/
virtual UBool find(UErrorCode &status);
@@ -852,7 +852,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
*
* @param start The (native) index in the input string to begin the search.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 2.4
*/
virtual UBool find(int64_t start, UErrorCode &status);
@@ -1271,7 +1271,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
* See useTransparentBounds for a description of transparent and opaque bounds.
* By default, a matcher uses opaque region boundaries.
*
- * @return TRUE if this matcher is using opaque bounds, false if it is not.
+ * @return true if this matcher is using opaque bounds, false if it is not.
* @stable ICU 4.0
*/
virtual UBool hasTransparentBounds() const;
@@ -1290,7 +1290,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
*
* By default, a matcher uses opaque bounds.
*
- * @param b TRUE for transparent bounds; FALSE for opaque bounds
+ * @param b true for transparent bounds; false for opaque bounds
* @return This Matcher;
* @stable ICU 4.0
**/
@@ -1301,7 +1301,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
* Return true if this matcher is using anchoring bounds.
* By default, matchers use anchoring region bounds.
*
- * @return TRUE if this matcher is using anchoring bounds.
+ * @return true if this matcher is using anchoring bounds.
* @stable ICU 4.0
*/
virtual UBool hasAnchoringBounds() const;
@@ -1315,7 +1315,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
*
* Anchoring Bounds are the default for regions.
*
- * @param b TRUE if to enable anchoring bounds; FALSE to disable them.
+ * @param b true if to enable anchoring bounds; false to disable them.
* @return This Matcher
* @stable ICU 4.0
*/
@@ -1323,26 +1323,26 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
/**
- * Return TRUE if the most recent matching operation attempted to access
+ * Return true if the most recent matching operation attempted to access
* additional input beyond the available input text.
* In this case, additional input text could change the results of the match.
*
* hitEnd() is defined for both successful and unsuccessful matches.
- * In either case hitEnd() will return TRUE if if the end of the text was
+ * In either case hitEnd() will return true if if the end of the text was
* reached at any point during the matching process.
*
- * @return TRUE if the most recent match hit the end of input
+ * @return true if the most recent match hit the end of input
* @stable ICU 4.0
*/
virtual UBool hitEnd() const;
/**
- * Return TRUE the most recent match succeeded and additional input could cause
+ * Return true the most recent match succeeded and additional input could cause
* it to fail. If this method returns false and a match was found, then more input
* might change the match but the match won't be lost. If a match was not found,
* then requireEnd has no meaning.
*
- * @return TRUE if more input could cause the most recent match to no longer match.
+ * @return true if more input could cause the most recent match to no longer match.
* @stable ICU 4.0
*/
virtual UBool requireEnd() const;
@@ -1781,7 +1781,7 @@ class U_I18N_API RegexMatcher U_FINAL : public UObject {
inline REStackFrame *StateSave(REStackFrame *fp, int64_t savePatIdx, UErrorCode &status);
void IncrementTime(UErrorCode &status);
- // Call user find callback function, if set. Return TRUE if operation should be interrupted.
+ // Call user find callback function, if set. Return true if operation should be interrupted.
inline UBool findProgressInterrupt(int64_t matchIndex, UErrorCode &status);
int64_t appendGroup(int32_t groupNum, UText *dest, UErrorCode &status) const;
diff --git a/icu4c/source/i18n/unicode/search.h b/icu4c/source/i18n/unicode/search.h
index 2865366a33f..f1c4b2bc97e 100644
--- a/icu4c/source/i18n/unicode/search.h
+++ b/icu4c/source/i18n/unicode/search.h
@@ -267,9 +267,9 @@ class U_I18N_API SearchIterator : public UObject {
/**
* Equality operator.
* @param that SearchIterator instance to be compared.
- * @return TRUE if both BreakIterators are of the same class, have the
+ * @return true if both BreakIterators are of the same class, have the
* same behavior, terates over the same text and have the same
- * attributes. FALSE otherwise.
+ * attributes. false otherwise.
* @stable ICU 2.0
*/
virtual UBool operator==(const SearchIterator &that) const;
@@ -277,7 +277,7 @@ class U_I18N_API SearchIterator : public UObject {
/**
* Not-equal operator.
* @param that SearchIterator instance to be compared.
- * @return FALSE if operator== returns TRUE, and vice versa.
+ * @return false if operator== returns true, and vice versa.
* @stable ICU 2.0
*/
UBool operator!=(const SearchIterator &that) const;
diff --git a/icu4c/source/i18n/unicode/simpletz.h b/icu4c/source/i18n/unicode/simpletz.h
index 980a1b8c62e..792fddb4d9d 100644
--- a/icu4c/source/i18n/unicode/simpletz.h
+++ b/icu4c/source/i18n/unicode/simpletz.h
@@ -714,7 +714,7 @@ class U_I18N_API SimpleTimeZone: public BasicTimeZone {
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the first transition after the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
@@ -724,7 +724,7 @@ class U_I18N_API SimpleTimeZone: public BasicTimeZone {
* @param base The base time.
* @param inclusive Whether the base time is inclusive or not.
* @param result Receives the most recent transition before the base time.
- * @return TRUE if the transition is found.
+ * @return true if the transition is found.
* @stable ICU 3.8
*/
virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
diff --git a/icu4c/source/i18n/unicode/smpdtfmt.h b/icu4c/source/i18n/unicode/smpdtfmt.h
index b4b0e5fb390..54512f17aa1 100644
--- a/icu4c/source/i18n/unicode/smpdtfmt.h
+++ b/icu4c/source/i18n/unicode/smpdtfmt.h
@@ -1183,11 +1183,11 @@ class U_I18N_API SimpleDateFormat: public DateFormat {
/**
* This is for ICU internal use only. Please do not use.
* Check whether the 'field' is smaller than all the fields covered in
- * pattern, return TRUE if it is. The sequence of calendar field,
+ * pattern, return true if it is. The sequence of calendar field,
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
* @param field the calendar field need to check against
- * @return TRUE if the 'field' is smaller than all the fields
- * covered in pattern. FALSE otherwise.
+ * @return true if the 'field' is smaller than all the fields
+ * covered in pattern. false otherwise.
* @internal ICU 4.0
*/
UBool isFieldUnitIgnored(UCalendarDateFields field) const;
@@ -1196,12 +1196,12 @@ class U_I18N_API SimpleDateFormat: public DateFormat {
/**
* This is for ICU internal use only. Please do not use.
* Check whether the 'field' is smaller than all the fields covered in
- * pattern, return TRUE if it is. The sequence of calendar field,
+ * pattern, return true if it is. The sequence of calendar field,
* from large to small is: ERA, YEAR, MONTH, DATE, AM_PM, HOUR, MINUTE,...
* @param pattern the pattern to check against
* @param field the calendar field need to check against
- * @return TRUE if the 'field' is smaller than all the fields
- * covered in pattern. FALSE otherwise.
+ * @return true if the 'field' is smaller than all the fields
+ * covered in pattern. false otherwise.
* @internal ICU 4.0
*/
static UBool isFieldUnitIgnored(const UnicodeString& pattern,
@@ -1305,12 +1305,12 @@ class U_I18N_API SimpleDateFormat: public DateFormat {
static UBool isNumeric(char16_t formatChar, int32_t count);
/**
- * Returns TRUE if the patternOffset is at the start of a numeric field.
+ * Returns true if the patternOffset is at the start of a numeric field.
*/
static UBool isAtNumericField(const UnicodeString &pattern, int32_t patternOffset);
/**
- * Returns TRUE if the patternOffset is right after a non-numeric field.
+ * Returns true if the patternOffset is right after a non-numeric field.
*/
static UBool isAfterNonNumericField(const UnicodeString &pattern, int32_t patternOffset);
@@ -1390,11 +1390,11 @@ class U_I18N_API SimpleDateFormat: public DateFormat {
* @param text the text being parsed
* @param textOffset the starting offset into the text. On output
* will be set to the offset of the character after the match
- * @param whitespaceLenient TRUE
if whitespace parse is lenient, FALSE
otherwise.
- * @param partialMatchLenient TRUE
if partial match parse is lenient, FALSE
otherwise.
- * @param oldLeniency TRUE
if old leniency control is lenient, FALSE
otherwise.
+ * @param whitespaceLenient true
if whitespace parse is lenient, false
otherwise.
+ * @param partialMatchLenient true
if partial match parse is lenient, false
otherwise.
+ * @param oldLeniency true
if old leniency control is lenient, false
otherwise.
*
- * @return TRUE
if the literal text could be matched, FALSE
otherwise.
+ * @return true
if the literal text could be matched, false
otherwise.
*/
static UBool matchLiterals(const UnicodeString &pattern, int32_t &patternOffset,
const UnicodeString &text, int32_t &textOffset,
diff --git a/icu4c/source/i18n/unicode/sortkey.h b/icu4c/source/i18n/unicode/sortkey.h
index 34ed7ee6921..1ca074477c7 100644
--- a/icu4c/source/i18n/unicode/sortkey.h
+++ b/icu4c/source/i18n/unicode/sortkey.h
@@ -150,7 +150,7 @@ class U_I18N_API CollationKey : public UObject {
/**
* Compare if two collation keys are not the same.
* @param source the collation key to compare to.
- * @return Returns TRUE if two collation keys are different, FALSE otherwise.
+ * @return Returns true if two collation keys are different, false otherwise.
* @stable ICU 2.0
*/
UBool operator!=(const CollationKey& source) const;
@@ -159,7 +159,7 @@ class U_I18N_API CollationKey : public UObject {
/**
* Test to see if the key is in an invalid state. The key will be in an
* invalid state if it couldn't allocate memory for some operation.
- * @return Returns TRUE if the key is in an invalid, FALSE otherwise.
+ * @return Returns true if the key is in an invalid, false otherwise.
* @stable ICU 2.0
*/
UBool isBogus(void) const;
diff --git a/icu4c/source/i18n/unicode/stsearch.h b/icu4c/source/i18n/unicode/stsearch.h
index fcb5dbf2009..9bf3df07df5 100644
--- a/icu4c/source/i18n/unicode/stsearch.h
+++ b/icu4c/source/i18n/unicode/stsearch.h
@@ -292,7 +292,7 @@ class U_I18N_API StringSearch U_FINAL : public SearchIterator
/**
* Equality operator.
* @param that instance to be compared.
- * @return TRUE if both instances have the same attributes,
+ * @return true if both instances have the same attributes,
* breakiterators, collators and iterate over the same text
* while looking for the same pattern.
* @stable ICU 2.0
diff --git a/icu4c/source/i18n/unicode/tblcoll.h b/icu4c/source/i18n/unicode/tblcoll.h
index f5dc135bc49..acaaccdc122 100644
--- a/icu4c/source/i18n/unicode/tblcoll.h
+++ b/icu4c/source/i18n/unicode/tblcoll.h
@@ -752,7 +752,7 @@ class U_I18N_API RuleBasedCollator : public Collator {
* Implements ucol_getContractionsAndExpansions().
* Gets this collator's sets of contraction strings and/or
* characters and strings that map to multiple collation elements (expansions).
- * If addPrefixes is TRUE, then contractions that are expressed as
+ * If addPrefixes is true, then contractions that are expressed as
* prefix/pre-context rules are included.
* @param contractions if not NULL, the set to hold the contractions
* @param expansions if not NULL, the set to hold the expansions
@@ -857,7 +857,7 @@ class U_I18N_API RuleBasedCollator : public Collator {
* Tests whether a character is "unsafe" for use as a collation starting point.
*
* @param c code point or code unit
- * @return TRUE if c is unsafe
+ * @return true if c is unsafe
* @see CollationElementIterator#setOffset(int)
*/
UBool isUnsafe(UChar32 c) const;
diff --git a/icu4c/source/i18n/unicode/timezone.h b/icu4c/source/i18n/unicode/timezone.h
index e53aa7c850b..155b09585f6 100644
--- a/icu4c/source/i18n/unicode/timezone.h
+++ b/icu4c/source/i18n/unicode/timezone.h
@@ -707,8 +707,8 @@ class U_I18N_API TimeZone : public UObject {
* there are time zones that used daylight savings time in the
* past, but no longer used currently. For example, Asia/Tokyo has
* never used daylight savings time since 1951. Most clients would
- * expect that this method to return FALSE
for such case.
- * The default implementation of this method returns TRUE
+ * expect that this method to return false
for such case.
+ * The default implementation of this method returns true
* when the time zone uses daylight savings time in the current
* (Gregorian) calendar year.
* In Java 7, observesDaylightTime()
was added in
@@ -925,7 +925,7 @@ class U_I18N_API TimeZone : public UObject {
* @param hour Receives parsed hour field
* @param minute Receives parsed minute field
* @param second Receives parsed second field
- * @return Returns TRUE when the given custom id is valid.
+ * @return Returns true when the given custom id is valid.
*/
static UBool parseCustomID(const UnicodeString& id, int32_t& sign, int32_t& hour,
int32_t& minute, int32_t& second);
@@ -948,7 +948,7 @@ class U_I18N_API TimeZone : public UObject {
* @param hour offset hours
* @param min offset minutes
* @param sec offset seconds
- * @param negative sign of the offset, TRUE for negative offset.
+ * @param negative sign of the offset, true for negative offset.
* @param id Receves the format result (normalized custom ID)
* @return The reference to id
*/
diff --git a/icu4c/source/i18n/unicode/tmutamt.h b/icu4c/source/i18n/unicode/tmutamt.h
index 8bcc684d3a9..d5972e7991e 100644
--- a/icu4c/source/i18n/unicode/tmutamt.h
+++ b/icu4c/source/i18n/unicode/tmutamt.h
@@ -39,7 +39,7 @@ class U_I18N_API TimeUnitAmount: public Measure {
/**
* Construct TimeUnitAmount object with the given number and the
* given time unit.
- * @param number a numeric object; number.isNumeric() must be TRUE
+ * @param number a numeric object; number.isNumeric() must be true
* @param timeUnitField the time unit field of a time unit
* @param status the input-output error code.
* If the number is not numeric or the timeUnitField
diff --git a/icu4c/source/i18n/unicode/translit.h b/icu4c/source/i18n/unicode/translit.h
index fe2568d50aa..2aa02c39f13 100644
--- a/icu4c/source/i18n/unicode/translit.h
+++ b/icu4c/source/i18n/unicode/translit.h
@@ -882,7 +882,7 @@ class U_I18N_API Transliterator : public UObject {
* another transliterator.
* @param text the text to be transliterated
* @param index the position indices
- * @param incremental if TRUE, then assume more characters may be inserted
+ * @param incremental if true, then assume more characters may be inserted
* at index.limit, and postpone processing to accomodate future incoming
* characters
* @stable ICU 2.4
@@ -897,14 +897,14 @@ class U_I18N_API Transliterator : public UObject {
* Top-level transliteration method, handling filtering, incremental and
* non-incremental transliteration, and rollback. All transliteration
* public API methods eventually call this method with a rollback argument
- * of TRUE. Other entities may call this method but rollback should be
- * FALSE.
+ * of true. Other entities may call this method but rollback should be
+ * false.
*
*
If this transliterator has a filter, break up the input text into runs * of unfiltered characters. Pass each run to * subclass.handleTransliterate(). * - *
In incremental mode, if rollback is TRUE, perform a special + *
In incremental mode, if rollback is true, perform a special
* incremental procedure in which several passes are made over the input
* text, adding one character at a time, and committing successful
* transliterations as they occur. Unsuccessful transliterations are rolled
@@ -912,12 +912,12 @@ class U_I18N_API Transliterator : public UObject {
*
* @param text the text to be transliterated
* @param index the position indices
- * @param incremental if TRUE, then assume more characters may be inserted
+ * @param incremental if true, then assume more characters may be inserted
* at index.limit, and postpone processing to accomodate future incoming
* characters
- * @param rollback if TRUE and if incremental is TRUE, then perform special
+ * @param rollback if true and if incremental is true, then perform special
* incremental processing, as described above, and undo partial
- * transliterations where necessary. If incremental is FALSE then this
+ * transliterations where necessary. If incremental is false then this
* parameter is ignored.
*/
virtual void filteredTransliterate(Replaceable& text,
@@ -1119,7 +1119,7 @@ class U_I18N_API Transliterator : public UObject {
* to recreate this transliterator.
* @param result the string to receive the rules. Previous
* contents will be deleted.
- * @param escapeUnprintable if TRUE then convert unprintable
+ * @param escapeUnprintable if true then convert unprintable
* character to their hex escape representations, \\uxxxx or
* \\Uxxxxxxxx. Unprintable characters are those other than
* U+000A, U+0020..U+007E.
diff --git a/icu4c/source/i18n/unicode/tzfmt.h b/icu4c/source/i18n/unicode/tzfmt.h
index 6d3863b1e5a..4411865984b 100644
--- a/icu4c/source/i18n/unicode/tzfmt.h
+++ b/icu4c/source/i18n/unicode/tzfmt.h
@@ -295,7 +295,7 @@ class U_I18N_API TimeZoneFormat : public Format {
* Return true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal.
* @param other The object to be compared with.
- * @return Return TRUE if the given Format objects are semantically equal.
+ * @return Return true if the given Format objects are semantically equal.
* Objects of different subclasses are considered unequal.
* @stable ICU 50
*/
@@ -814,7 +814,7 @@ class U_I18N_API TimeZoneFormat : public Format {
* @param str the string
* @param codeArray receives the result
* @param capacity the capacity of codeArray
- * @return TRUE when the specified code array is fully filled with code points
+ * @return true when the specified code array is fully filled with code points
* (no under/overflow).
*/
static UBool toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t capacity);
@@ -849,8 +849,8 @@ class U_I18N_API TimeZoneFormat : public Format {
* @param text the text contains ISO 8601 style time zone string (e.g. "-08:00", "Z")
* at the position.
* @param pos the position, non-negative error index will be set on failure.
- * @param extendedOnly TRUE if parsing the text as ISO 8601 extended offset format (e.g. "-08:00"),
- * or FALSE to evaluate the text as basic format.
+ * @param extendedOnly true if parsing the text as ISO 8601 extended offset format (e.g. "-08:00"),
+ * or false to evaluate the text as basic format.
* @param hasDigitOffset receiving if the parsed zone string contains offset digits.
* @return the offset from GMT(UTC) in milliseconds for the given ISO 8601 style
* time zone string.
diff --git a/icu4c/source/i18n/unicode/tznames.h b/icu4c/source/i18n/unicode/tznames.h
index 860494221df..2e20eff6089 100644
--- a/icu4c/source/i18n/unicode/tznames.h
+++ b/icu4c/source/i18n/unicode/tznames.h
@@ -139,7 +139,7 @@ class U_I18N_API TimeZoneNames : public UObject {
/**
* Return true if the given TimeZoneNames objects are semantically equal.
* @param other the object to be compared with.
- * @return Return TRUE if the given Format objects are semantically equal.
+ * @return Return true if the given Format objects are semantically equal.
* @stable ICU 50
*/
virtual UBool operator==(const TimeZoneNames& other) const = 0;
@@ -148,7 +148,7 @@ class U_I18N_API TimeZoneNames : public UObject {
* Return true if the given TimeZoneNames objects are not semantically
* equal.
* @param other the object to be compared with.
- * @return Return TRUE if the given Format objects are not semantically equal.
+ * @return Return true if the given Format objects are not semantically equal.
* @stable ICU 50
*/
UBool operator!=(const TimeZoneNames& other) const { return !operator==(other); }
@@ -373,7 +373,7 @@ class U_I18N_API TimeZoneNames : public UObject {
* Gets the zone ID of a match at the specified index.
* @param idx The index
* @param tzID Receives the zone ID.
- * @return TRUE if the zone ID was set to tzID.
+ * @return true if the zone ID was set to tzID.
* @internal
*/
UBool getTimeZoneIDAt(int32_t idx, UnicodeString& tzID) const;
@@ -382,7 +382,7 @@ class U_I18N_API TimeZoneNames : public UObject {
* Gets the metazone ID of a match at the specified index.
* @param idx The index
* @param mzID Receives the metazone ID
- * @return TRUE if the meta zone ID was set to mzID.
+ * @return true if the meta zone ID was set to mzID.
* @internal
*/
UBool getMetaZoneIDAt(int32_t idx, UnicodeString& mzID) const;
diff --git a/icu4c/source/i18n/unicode/ucal.h b/icu4c/source/i18n/unicode/ucal.h
index 4e6f0265032..96a76b4337e 100644
--- a/icu4c/source/i18n/unicode/ucal.h
+++ b/icu4c/source/i18n/unicode/ucal.h
@@ -871,7 +871,7 @@ ucal_getTimeZoneDisplayName(const UCalendar* cal,
* Daylight savings time is not used in all parts of the world.
* @param cal The UCalendar to query.
* @param status A pointer to an UErrorCode to receive any errors
- * @return TRUE if cal is currently in daylight savings time, FALSE otherwise
+ * @return true if cal is currently in daylight savings time, false otherwise
* @stable ICU 2.0
*/
U_STABLE UBool U_EXPORT2
@@ -1125,12 +1125,12 @@ ucal_setDateTime(UCalendar* cal,
UErrorCode* status);
/**
- * Returns TRUE if two UCalendars are equivalent. Equivalent
+ * Returns true if two UCalendars are equivalent. Equivalent
* UCalendars will behave identically, but they may be set to
* different times.
* @param cal1 The first of the UCalendars to compare.
* @param cal2 The second of the UCalendars to compare.
- * @return TRUE if cal1 and cal2 are equivalent, FALSE otherwise.
+ * @return true if cal1 and cal2 are equivalent, false otherwise.
* @stable ICU 2.0
*/
U_STABLE UBool U_EXPORT2
@@ -1240,7 +1240,7 @@ ucal_set(UCalendar* cal,
* UCAL_WEEK_OF_YEAR, UCAL_WEEK_OF_MONTH, UCAL_DATE, UCAL_DAY_OF_YEAR, UCAL_DAY_OF_WEEK,
* UCAL_DAY_OF_WEEK_IN_MONTH, UCAL_AM_PM, UCAL_HOUR, UCAL_HOUR_OF_DAY, UCAL_MINUTE, UCAL_SECOND,
* UCAL_MILLISECOND, UCAL_ZONE_OFFSET, UCAL_DST_OFFSET.
- * @return TRUE if field is set, FALSE otherwise.
+ * @return true if field is set, false otherwise.
* @see ucal_get
* @see ucal_set
* @see ucal_clearField
@@ -1467,13 +1467,13 @@ U_STABLE int32_t U_EXPORT2
ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
/**
- * Returns TRUE if the given UDate is in the weekend in
+ * Returns true if the given UDate is in the weekend in
* this calendar system.
* @param cal The UCalendar to query.
* @param date The UDate in question.
* @param status The error code for the operation.
- * @return TRUE if the given UDate is in the weekend in
- * this calendar system, FALSE otherwise.
+ * @return true if the given UDate is in the weekend in
+ * this calendar system, false otherwise.
* @stable ICU 4.4
*/
U_STABLE UBool U_EXPORT2
@@ -1547,13 +1547,13 @@ typedef enum UTimeZoneTransitionType UTimeZoneTransitionType; /**< @stable ICU 5
* the calendar's current date, in the time zone to which the calendar
* is currently set. If there is no known time zone transition of the
* requested type relative to the calendar's date, the function returns
-* FALSE.
+* false.
* @param cal The UCalendar to query.
* @param type The type of transition desired.
* @param transition A pointer to a UDate to be set to the transition time.
-* If the function returns FALSE, the value set is unspecified.
+* If the function returns false, the value set is unspecified.
* @param status A pointer to a UErrorCode to receive any errors.
-* @return TRUE if a valid transition time is set in *transition, FALSE
+* @return true if a valid transition time is set in *transition, false
* otherwise.
* @stable ICU 50
*/
diff --git a/icu4c/source/i18n/unicode/ucol.h b/icu4c/source/i18n/unicode/ucol.h
index f7e6919a51d..f1fead1c9ad 100644
--- a/icu4c/source/i18n/unicode/ucol.h
+++ b/icu4c/source/i18n/unicode/ucol.h
@@ -452,12 +452,12 @@ ucol_openRules( const UChar *rules,
* state for a locale.
* @param parseError if not NULL, structure that will get filled with error's pre
* and post context in case of error.
- * @param forceDefaults if FALSE, the settings that are the same as the collator
+ * @param forceDefaults if false, the settings that are the same as the collator
* default settings will not be applied (for example, setting
* French secondary on a French collator would not be executed).
- * If TRUE, all the settings will be applied regardless of the
+ * If true, all the settings will be applied regardless of the
* collator default value. If the definition
- * strings are to be cached, should be set to FALSE.
+ * strings are to be cached, should be set to false.
* @param status Error code. Apart from regular error conditions connected to
* instantiating collators (like out of memory or similar), this
* API will return an error if an invalid attribute or attribute/value
@@ -603,7 +603,7 @@ ucol_strcollUTF8(
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated.
- * @return TRUE if source is greater than target, FALSE otherwise.
+ * @return true if source is greater than target, false otherwise.
* @see ucol_strcoll
* @see ucol_greaterOrEqual
* @see ucol_equal
@@ -622,7 +622,7 @@ ucol_greater(const UCollator *coll,
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated.
- * @return TRUE if source is greater than or equal to target, FALSE otherwise.
+ * @return true if source is greater than or equal to target, false otherwise.
* @see ucol_strcoll
* @see ucol_greater
* @see ucol_equal
@@ -641,7 +641,7 @@ ucol_greaterOrEqual(const UCollator *coll,
* @param sourceLength The length of source, or -1 if null-terminated.
* @param target The target string.
* @param targetLength The length of target, or -1 if null-terminated.
- * @return TRUE if source is equal to target, FALSE otherwise
+ * @return true if source is equal to target, false otherwise
* @see ucol_strcoll
* @see ucol_greater
* @see ucol_greaterOrEqual
@@ -1439,12 +1439,12 @@ ucol_getUnsafeSet( const UCollator *coll,
* state for a locale.
* @param parseError if not NULL, structure that will get filled with error's pre
* and post context in case of error.
- * @param forceDefaults if FALSE, the settings that are the same as the collator
+ * @param forceDefaults if false, the settings that are the same as the collator
* default settings will not be applied (for example, setting
* French secondary on a French collator would not be executed).
- * If TRUE, all the settings will be applied regardless of the
+ * If true, all the settings will be applied regardless of the
* collator default value. If the definition
- * strings are to be cached, should be set to FALSE.
+ * strings are to be cached, should be set to false.
* @param status Error code. Apart from regular error conditions connected to
* instantiating collators (like out of memory or similar), this
* API will return an error if an invalid attribute or attribute/value
diff --git a/icu4c/source/i18n/unicode/ucsdet.h b/icu4c/source/i18n/unicode/ucsdet.h
index d28da502903..83b680d5ccf 100644
--- a/icu4c/source/i18n/unicode/ucsdet.h
+++ b/icu4c/source/i18n/unicode/ucsdet.h
@@ -360,7 +360,7 @@ ucsdet_getAllDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *statu
* heuristics.
*
* @param ucsd The charset detector to check.
- * @return TRUE if filtering is enabled.
+ * @return true if filtering is enabled.
* @stable ICU 3.6
*/
@@ -406,7 +406,7 @@ ucsdet_getDetectableCharsets(const UCharsetDetector *ucsd, UErrorCode *status);
*
* @param ucsd a Charset detector.
* @param encoding encoding the name of charset encoding.
- * @param enabled TRUE
to enable, or FALSE
to disable the
+ * @param enabled true
to enable, or false
to disable the
* charset encoding.
* @param status receives the return status. When the name of charset encoding
* is not supported, U_ILLEGAL_ARGUMENT_ERROR is set.
diff --git a/icu4c/source/i18n/unicode/udat.h b/icu4c/source/i18n/unicode/udat.h
index f865a451432..b25e34de4a7 100644
--- a/icu4c/source/i18n/unicode/udat.h
+++ b/icu4c/source/i18n/unicode/udat.h
@@ -1235,7 +1235,7 @@ udat_parseCalendar(const UDateFormat* format,
* With lenient parsing, the parser may use heuristics to interpret inputs that do not
* precisely match the pattern. With strict parsing, inputs must match the pattern.
* @param fmt The formatter to query
-* @return TRUE if fmt is set to perform lenient parsing, FALSE otherwise.
+* @return true if fmt is set to perform lenient parsing, false otherwise.
* @see udat_setLenient
* @stable ICU 2.0
*/
@@ -1247,7 +1247,7 @@ udat_isLenient(const UDateFormat* fmt);
* With lenient parsing, the parser may use heuristics to interpret inputs that do not
* precisely match the pattern. With strict parsing, inputs must match the pattern.
* @param fmt The formatter to set
-* @param isLenient TRUE if fmt should perform lenient parsing, FALSE otherwise.
+* @param isLenient true if fmt should perform lenient parsing, false otherwise.
* @see dat_isLenient
* @stable ICU 2.0
*/
@@ -1407,7 +1407,7 @@ udat_set2DigitYearStart( UDateFormat *fmt,
* Extract the pattern from a UDateFormat.
* The pattern will follow the pattern syntax rules.
* @param fmt The formatter to query.
-* @param localized TRUE if the pattern should be localized, FALSE otherwise.
+* @param localized true if the pattern should be localized, false otherwise.
* @param result A pointer to a buffer to receive the pattern.
* @param resultLength The maximum size of result.
* @param status A pointer to an UErrorCode to receive any errors
@@ -1426,7 +1426,7 @@ udat_toPattern( const UDateFormat *fmt,
* Set the pattern used by an UDateFormat.
* The pattern should follow the pattern syntax rules.
* @param format The formatter to set.
-* @param localized TRUE if the pattern is localized, FALSE otherwise.
+* @param localized true if the pattern is localized, false otherwise.
* @param pattern The new pattern
* @param patternLength The length of pattern, or -1 if null-terminated.
* @see udat_toPattern
diff --git a/icu4c/source/i18n/unicode/uformattedvalue.h b/icu4c/source/i18n/unicode/uformattedvalue.h
index 07f4281f57b..0eaa84e4e62 100644
--- a/icu4c/source/i18n/unicode/uformattedvalue.h
+++ b/icu4c/source/i18n/unicode/uformattedvalue.h
@@ -220,7 +220,7 @@ ucfpos_constrainField(
*
* If a category or field constraint was set, this function returns the constrained
* category. Otherwise, the return value is well-defined only after
- * ufmtval_nextPosition returns TRUE.
+ * ufmtval_nextPosition returns true.
*
* @param ucfpos The instance of UConstrainedFieldPosition.
* @param ec Set if an error occurs.
@@ -238,7 +238,7 @@ ucfpos_getCategory(
*
* If a field constraint was set, this function returns the constrained
* field. Otherwise, the return value is well-defined only after
- * ufmtval_nextPosition returns TRUE.
+ * ufmtval_nextPosition returns true.
*
* @param ucfpos The instance of UConstrainedFieldPosition.
* @param ec Set if an error occurs.
@@ -254,7 +254,7 @@ ucfpos_getField(
/**
* Gets the INCLUSIVE start and EXCLUSIVE end index stored for the current position.
*
- * The output values are well-defined only after ufmtval_nextPosition returns TRUE.
+ * The output values are well-defined only after ufmtval_nextPosition returns true.
*
* @param ucfpos The instance of UConstrainedFieldPosition.
* @param pStart Set to the start index saved in the instance. Ignored if nullptr.
@@ -401,7 +401,7 @@ ufmtval_getString(
* see ucfpos_constrainCategory
* and ucfpos_constrainField.
* @param ec Set if an error occurs.
- * @return TRUE if another position was found; FALSE otherwise.
+ * @return true if another position was found; false otherwise.
* @stable ICU 64
*/
U_STABLE UBool U_EXPORT2
diff --git a/icu4c/source/i18n/unicode/unirepl.h b/icu4c/source/i18n/unicode/unirepl.h
index 1ec627abcb9..7f6edcf61ad 100644
--- a/icu4c/source/i18n/unicode/unirepl.h
+++ b/icu4c/source/i18n/unicode/unirepl.h
@@ -77,7 +77,7 @@ class U_I18N_API UnicodeReplacer /* not : public UObject because this is an inte
* replacer that is equal to this one.
* @param result the string to receive the pattern. Previous
* contents will be deleted.
- * @param escapeUnprintable if TRUE then convert unprintable
+ * @param escapeUnprintable if true then convert unprintable
* character to their hex escape representations, \\uxxxx or
* \\Uxxxxxxxx. Unprintable characters are defined by
* Utility.isUnprintable().
diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h
index 9aceb8c64eb..cefe10c7713 100644
--- a/icu4c/source/i18n/unicode/unum.h
+++ b/icu4c/source/i18n/unicode/unum.h
@@ -925,7 +925,7 @@ unum_parseToUFormattable(const UNumberFormat* fmt,
* on a DecimalFormat, other formats return U_UNSUPPORTED_ERROR
* in the status.
* @param format The formatter to set.
- * @param localized TRUE if the pattern is localized, FALSE otherwise.
+ * @param localized true if the pattern is localized, false otherwise.
* @param pattern The new pattern
* @param patternLength The length of pattern, or -1 if null-terminated.
* @param parseError A pointer to UParseError to receive information
@@ -1300,8 +1300,8 @@ unum_setTextAttribute( UNumberFormat* fmt,
* Extract the pattern from a UNumberFormat. The pattern will follow
* the DecimalFormat pattern syntax.
* @param fmt The formatter to query.
- * @param isPatternLocalized TRUE if the pattern should be localized,
- * FALSE otherwise. This is ignored if the formatter is a rule-based
+ * @param isPatternLocalized true if the pattern should be localized,
+ * false otherwise. This is ignored if the formatter is a rule-based
* formatter.
* @param result A pointer to a buffer to receive the pattern.
* @param resultLength The maximum size of result.
diff --git a/icu4c/source/i18n/unicode/unumberformatter.h b/icu4c/source/i18n/unicode/unumberformatter.h
index 83bb9b625f2..828b09b1ef2 100644
--- a/icu4c/source/i18n/unicode/unumberformatter.h
+++ b/icu4c/source/i18n/unicode/unumberformatter.h
@@ -625,7 +625,7 @@ unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t buf
* "beginIndex" field is set to the beginning of the first occurrence of the field after the
* input "endIndex", and "endIndex" is set to the end of that occurrence of the field
* (exclusive index). If a field position is not found, the FieldPosition is not changed and
- * the method returns FALSE.
+ * the method returns false.
* @param ec Set if an error occurs.
* @stable ICU 62
*/
diff --git a/icu4c/source/i18n/unicode/unumsys.h b/icu4c/source/i18n/unicode/unumsys.h
index d459e80e17f..b7699ad3ae3 100644
--- a/icu4c/source/i18n/unicode/unumsys.h
+++ b/icu4c/source/i18n/unicode/unumsys.h
@@ -133,7 +133,7 @@ unumsys_getName(const UNumberingSystem *unumsys);
* Returns whether the given UNumberingSystem object is for an algorithmic (not purely
* positional) system.
* @param unumsys The UNumberingSystem whose algorithmic status is desired.
- * @return TRUE if the specified UNumberingSystem object is for an algorithmic
+ * @return true if the specified UNumberingSystem object is for an algorithmic
* system.
* @stable ICU 52
*/
diff --git a/icu4c/source/i18n/unicode/uregex.h b/icu4c/source/i18n/unicode/uregex.h
index dab172d51e6..bd0f134899f 100644
--- a/icu4c/source/i18n/unicode/uregex.h
+++ b/icu4c/source/i18n/unicode/uregex.h
@@ -444,7 +444,7 @@ uregex_refreshUText(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or -1
* to match the input Region.
* @param status Receives errors detected by this function.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 3.0
*/
U_STABLE UBool U_EXPORT2
@@ -470,7 +470,7 @@ uregex_matches(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or -1
* to match the input Region.
* @param status Receives errors detected by this function.
- * @return TRUE if there is a match
+ * @return true if there is a match
* @stable ICU 4.6
*/
U_STABLE UBool U_EXPORT2
@@ -498,7 +498,7 @@ uregex_matches64(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or
* -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match.
+ * @return true if there is a match.
* @stable ICU 3.0
*/
U_STABLE UBool U_EXPORT2
@@ -527,7 +527,7 @@ uregex_lookingAt(URegularExpression *regexp,
* @param startIndex The input string (native) index at which to begin matching, or
* -1 to match the Input Region
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if there is a match.
+ * @return true if there is a match.
* @stable ICU 4.6
*/
U_STABLE UBool U_EXPORT2
@@ -551,7 +551,7 @@ uregex_lookingAt64(URegularExpression *regexp,
* @param startIndex The position (native) in the input string to begin the search, or
* -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 3.0
*/
U_STABLE UBool U_EXPORT2
@@ -576,7 +576,7 @@ uregex_find(URegularExpression *regexp,
* @param startIndex The position (native) in the input string to begin the search, or
* -1 to search within the Input Region.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @stable ICU 4.6
*/
U_STABLE UBool U_EXPORT2
@@ -593,7 +593,7 @@ uregex_find64(URegularExpression *regexp,
*
* @param regexp The compiled regular expression.
* @param status A reference to a UErrorCode to receive any errors.
- * @return TRUE if a match is found.
+ * @return true if a match is found.
* @see uregex_reset
* @stable ICU 3.0
*/
@@ -960,7 +960,7 @@ uregex_regionEnd64(const URegularExpression *regexp,
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if this matcher is using opaque bounds, false if it is not.
+ * @return true if this matcher is using opaque bounds, false if it is not.
* @stable ICU 4.0
*/
U_STABLE UBool U_EXPORT2
@@ -970,8 +970,8 @@ uregex_hasTransparentBounds(const URegularExpression *regexp,
/**
* Sets the transparency of region bounds for this URegularExpression.
- * Invoking this function with an argument of TRUE will set matches to use transparent bounds.
- * If the boolean argument is FALSE, then opaque bounds will be used.
+ * Invoking this function with an argument of true will set matches to use transparent bounds.
+ * If the boolean argument is false, then opaque bounds will be used.
*
* Using transparent bounds, the boundaries of the matching region are transparent
* to lookahead, lookbehind, and boundary matching constructs. Those constructs can
@@ -983,7 +983,7 @@ uregex_hasTransparentBounds(const URegularExpression *regexp,
* By default, opaque bounds are used.
*
* @param regexp The compiled regular expression.
- * @param b TRUE for transparent bounds; FALSE for opaque bounds
+ * @param b true for transparent bounds; false for opaque bounds
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.0
**/
@@ -999,7 +999,7 @@ uregex_useTransparentBounds(URegularExpression *regexp,
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if this matcher is using anchoring bounds.
+ * @return true if this matcher is using anchoring bounds.
* @stable ICU 4.0
*/
U_STABLE UBool U_EXPORT2
@@ -1016,7 +1016,7 @@ uregex_hasAnchoringBounds(const URegularExpression *regexp,
* Anchoring Bounds are the default for regions.
*
* @param regexp The compiled regular expression.
- * @param b TRUE if to enable anchoring bounds; FALSE to disable them.
+ * @param b true if to enable anchoring bounds; false to disable them.
* @param status A pointer to a UErrorCode to receive any errors.
* @stable ICU 4.0
*/
@@ -1026,13 +1026,13 @@ uregex_useAnchoringBounds(URegularExpression *regexp,
UErrorCode *status);
/**
- * Return TRUE if the most recent matching operation touched the
+ * Return true if the most recent matching operation touched the
* end of the text being processed. In this case, additional input text could
* change the results of that match.
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if the most recent match hit the end of input
+ * @return true if the most recent match hit the end of input
* @stable ICU 4.0
*/
U_STABLE UBool U_EXPORT2
@@ -1040,14 +1040,14 @@ uregex_hitEnd(const URegularExpression *regexp,
UErrorCode *status);
/**
- * Return TRUE the most recent match succeeded and additional input could cause
+ * Return true the most recent match succeeded and additional input could cause
* it to fail. If this function returns false and a match was found, then more input
* might change the match but the match won't be lost. If a match was not found,
* then requireEnd has no meaning.
*
* @param regexp The compiled regular expression.
* @param status A pointer to a UErrorCode to receive any errors.
- * @return TRUE if more input could cause the most recent match to no longer match.
+ * @return true if more input could cause the most recent match to no longer match.
* @stable ICU 4.0
*/
U_STABLE UBool U_EXPORT2
@@ -1483,7 +1483,7 @@ uregex_getStackLimit(const URegularExpression *regexp,
/**
* Function pointer for a regular expression matching callback function.
* When set, a callback function will be called periodically during matching
- * operations. If the call back function returns FALSE, the matching
+ * operations. If the call back function returns false, the matching
* operation will be terminated early.
*
* Note: the callback function must not call other functions on this
@@ -1494,8 +1494,8 @@ uregex_getStackLimit(const URegularExpression *regexp,
* uregex_setMatchCallback() is called.
* @param steps the accumulated processing time, in match steps,
* for this matching operation.
- * @return TRUE to continue the matching operation.
- * FALSE to terminate the matching operation.
+ * @return true to continue the matching operation.
+ * false to terminate the matching operation.
* @stable ICU 4.0
*/
U_CDECL_BEGIN
@@ -1557,7 +1557,7 @@ uregex_getMatchCallback(const URegularExpression *regexp,
* to be attempted, giving the application the opportunity to terminate a long-running
* find operation.
*
- * If the call back function returns FALSE, the find operation will be terminated early.
+ * If the call back function returns false, the find operation will be terminated early.
*
* Note: the callback function must not call other functions on this
* URegularExpression
@@ -1568,8 +1568,8 @@ uregex_getMatchCallback(const URegularExpression *regexp,
* @param matchIndex the next index at which a match attempt will be attempted for this
* find operation. If this callback interrupts the search, this is the
* index at which a find/findNext operation may be re-initiated.
- * @return TRUE to continue the matching operation.
- * FALSE to terminate the matching operation.
+ * @return true to continue the matching operation.
+ * false to terminate the matching operation.
* @stable ICU 4.6
*/
U_CDECL_BEGIN
diff --git a/icu4c/source/i18n/unicode/usearch.h b/icu4c/source/i18n/unicode/usearch.h
index 3b64c7b903a..741903b81fa 100644
--- a/icu4c/source/i18n/unicode/usearch.h
+++ b/icu4c/source/i18n/unicode/usearch.h
@@ -817,7 +817,7 @@ U_STABLE void U_EXPORT2 usearch_reset(UStringSearch *strsrch);
* A value of -1 will be returned if no match was found.
*
* @param status Report any errors. Note that no match found is not an error.
- * @return TRUE if a match was found, FALSE otherwise.
+ * @return true if a match was found, false otherwise.
*
* @internal
*/
@@ -877,7 +877,7 @@ U_INTERNAL UBool U_EXPORT2 usearch_search(UStringSearch *strsrch,
* A value of -1 will be returned if no match was found.
*
* @param status Report any errors. Note that no match found is not an error.
- * @return TRUE if a match was found, FALSE otherwise.
+ * @return true if a match was found, false otherwise.
*
* @internal
*/
diff --git a/icu4c/source/i18n/unicode/uspoof.h b/icu4c/source/i18n/unicode/uspoof.h
index 620d48fede9..6dc3b6d3dbe 100644
--- a/icu4c/source/i18n/unicode/uspoof.h
+++ b/icu4c/source/i18n/unicode/uspoof.h
@@ -154,10 +154,10 @@
* UChar* skel = (UChar*) malloc(++len * sizeof(UChar));
* status = U_ZERO_ERROR;
* uspoof_getSkeleton(sc, 0, str, -1, skel, len, &status);
- * UBool result = FALSE;
+ * UBool result = false;
* for (size_t i=0; itrue
if the paragraph should be set vertically.
*
* @param status will be set to any error code encountered during construction.
*
@@ -424,7 +424,7 @@ class U_LAYOUTEX_API ParagraphLayout : public UObject
*
* @param fontRuns is a pointer to a FontRuns
object representing the font runs.
*
- * @return TRUE
if the paragraph contains complex text.
+ * @return true
if the paragraph contains complex text.
*
* @stable ICU 3.2
*/
@@ -438,7 +438,7 @@ class U_LAYOUTEX_API ParagraphLayout : public UObject
*
* @param count is the number of characters in the paragraph.
*
- * @return TRUE
if any of the text requires complex processing.
+ * @return true
if any of the text requires complex processing.
*
* @stable ICU 3.2
*/
diff --git a/icu4c/source/layoutex/layout/RunArrays.h b/icu4c/source/layoutex/layout/RunArrays.h
index 5cf6c60b3f3..aa8b4ac5079 100644
--- a/icu4c/source/layoutex/layout/RunArrays.h
+++ b/icu4c/source/layoutex/layout/RunArrays.h
@@ -222,19 +222,19 @@ class U_LAYOUTEX_API RunArray : public UObject
};
inline RunArray::RunArray()
- : UObject(), fClientArrays(FALSE), fLimits(NULL), fCount(0), fCapacity(0)
+ : UObject(), fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0)
{
// nothing else to do...
}
inline RunArray::RunArray(const RunArray & /*other*/)
- : UObject(), fClientArrays(FALSE), fLimits(NULL), fCount(0), fCapacity(0)
+ : UObject(), fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(0)
{
// nothing else to do...
}
inline RunArray::RunArray(const le_int32 *limits, le_int32 count)
- : UObject(), fClientArrays(TRUE), fLimits(limits), fCount(count), fCapacity(count)
+ : UObject(), fClientArrays(true), fLimits(limits), fCount(count), fCapacity(count)
{
// nothing else to do...
}
diff --git a/icu4c/source/layoutex/layout/playout.h b/icu4c/source/layoutex/layout/playout.h
index 317b4389136..188e0de91c4 100644
--- a/icu4c/source/layoutex/layout/playout.h
+++ b/icu4c/source/layoutex/layout/playout.h
@@ -82,7 +82,7 @@ typedef void pl_visualRun;
*
* @param paragraphLevel is the directionality of the paragraph, as in the UBiDi object.
*
- * @param vertical is TRUE
if the paragraph should be set vertically.
+ * @param vertical is true
if the paragraph should be set vertically.
*
* @param status will be set to any error code encountered during construction.
*
@@ -126,7 +126,7 @@ pl_close(pl_paragraph *paragraph);
*
* @param count is the number of characters in the paragraph.
*
- * @return TRUE
if any of the text requires complex processing.
+ * @return true
if any of the text requires complex processing.
*
* @internal
*/
diff --git a/icu4c/source/samples/cal/uprint.c b/icu4c/source/samples/cal/uprint.c
index 0e66c973d39..59c5d3b830c 100644
--- a/icu4c/source/samples/cal/uprint.c
+++ b/icu4c/source/samples/cal/uprint.c
@@ -18,6 +18,7 @@
*/
#include "uprint.h"
+#include