+U_CAPI char * U_EXPORT2
+u_rtrim(char *s) {
+ char *end=uprv_strchr(s, 0);
+ while(s<end && U_IS_INV_WHITESPACE(*(end-1))) {
+ *--end = 0;
+ }
+ return end;
+}
+
+/*
+ * If the string starts with # @missing: then return the pointer to the
+ * following non-whitespace character.
+ * Otherwise return the original pointer.
+ * Unicode 5.0 adds such lines in some data files to document
+ * default property values.
+ * Poor man's regex for variable amounts of white space.
+ */
+static const char *
+getMissingLimit(const char *s) {
+ const char *s0=s;
+ if(
+ *(s=u_skipWhitespace(s))=='#' &&
+ *(s=u_skipWhitespace(s+1))=='@' &&
+ 0==strncmp((s=u_skipWhitespace(s+1)), "missing", 7) &&
+ *(s=u_skipWhitespace(s+7))==':'
+ ) {
+ return u_skipWhitespace(s+1);
+ } else {
+ return s0;
+ }
+}
+