/* *UniStrcat:Concatenatethesecondstringtothefirst * *Returns: *Addressofthefirststring
*/ staticinlinewchar_t *UniStrcat(wchar_t *ucs1, constwchar_t *ucs2)
{ wchar_t *anchor = ucs1; /* save a pointer to start of ucs1 */
while (*ucs1++) /*NULL*/; /* To end of first string */
ucs1--; /* Return to the null */ while ((*ucs1++ = *ucs2++)) /*NULL*/; /* copy string 2 over */ return anchor;
}
/* *UniStrcpy:Copyastring
*/ staticinlinewchar_t *UniStrcpy(wchar_t *ucs1, constwchar_t *ucs2)
{ wchar_t *anchor = ucs1; /* save the start of result string */
while ((*ucs1++ = *ucs2++)) /*NULL*/; return anchor;
}
/* *UniStrlen:Returnthelengthofastring(in16bitUnicodecharsnotbytes)
*/ staticinline size_t UniStrlen(constwchar_t *ucs1)
{ int i = 0;
while (*ucs1++)
i++; return i;
}
/* *UniStrnlen:Returnthelength(in16bitUnicodecharsnotbytes)ofa *string(lengthlimited)
*/ staticinline size_t UniStrnlen(constwchar_t *ucs1, int maxlen)
{ int i = 0;
while (*ucs1++) {
i++; if (i >= maxlen) break;
} return i;
}
while (*ucs1++) /*NULL*/;
ucs1--; /* point to null terminator of s1 */ while (n-- && (*ucs1 = *ucs2)) { /* copy s2 after s1 */
ucs1++;
ucs2++;
}
*ucs1 = 0; /* Null terminate the result */ return anchor;
}
while (*ucs1) { if (*ucs1 == *ucs2) { /* Partial match found */
ucs1++;
ucs2++;
} else { if (!*ucs2) /* Match found */ return (wchar_t *)anchor1;
ucs1 = ++anchor1; /* No match */
ucs2 = anchor2;
}
}
if (!*ucs2) /* Both end together */ return (wchar_t *)anchor1; /* Match found */ return NULL; /* No match */
}
if (uc < sizeof(NlsUniUpperTable)) { /* Latin characters */ return uc + NlsUniUpperTable[uc]; /* Use base tables */
}
rp = NlsUniUpperRange; /* Use range tables */ while (rp->start) { if (uc < rp->start) /* Before start of range */ return uc; /* Uppercase = input */ if (uc <= rp->end) /* In range */ return uc + rp->table[uc - rp->start];
rp++; /* Try next range */
} return uc; /* Past last range */
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.