src.ptr=nullptr;
}
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Construct a LocalArray with a specified length.
+ *
+ * @param p Pointer to the array to adopt.
+ * @param length The length of the array.
+ * @return A LocalArray with a length field.
+ * @draft ICU 67
+ */
static LocalArray<T> withLength(T *p, int32_t length) {
return LocalArray(p, length);
}
+#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DRAFT_API
/**
}
#endif /* U_HIDE_DRAFT_API */
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * The length of the array contained in the LocalArray. The size must be
+ * provided when the LocalArray is constructed.
+ *
+ * @return The length of the array, or -1 if unknown.
+ * @draft ICU 67
+ */
int32_t length() const { return fLength; }
+#endif // U_HIDE_DRAFT_API
private:
int32_t fLength = -1;
class StringEnumeration;
+#ifndef U_HIDE_DRAFT_API
/**
* Enumeration for unit complexity. There are three levels:
*
*/
UMEASURE_SI_PREFIX_YOCTO = -24
} UMeasureSIPrefix;
+#endif // U_HIDE_DRAFT_API
/**
* A unit such as length, mass, volume, currency, etc. A unit is
*/
MeasureUnit(MeasureUnit &&other) noexcept;
+#ifndef U_HIDE_DRAFT_API
/**
* Construct a MeasureUnit from a CLDR Sequence Unit Identifier, defined in UTS 35.
* Validates and canonicalizes the identifier.
* @draft ICU 67
*/
static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
+#endif // U_HIDE_DRAFT_API
/**
* Copy assignment operator.
*/
const char *getSubtype() const;
+#ifndef U_HIDE_DRAFT_API
/**
* Get the CLDR Sequence Unit Identifier for this MeasureUnit, as defined in UTS 35.
*
* @return An array of compound units, owned by the caller.
*/
LocalArray<MeasureUnit> getCompoundUnits(UErrorCode& status) const;
+#endif // U_HIDE_DRAFT_API
/**
* getAvailable gets all of the available units.