• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ICU-511.35/icuSources/common/

Lines Matching defs:label

35 // where the last ("root") label is the empty label
38 // if there is a trailing dot for the root label.
73 IDNA::labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
77 labelToASCII(UnicodeString::fromUTF8(label), destString,
83 IDNA::labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
87 labelToUnicode(UnicodeString::fromUTF8(label), destString,
120 labelToASCII(const UnicodeString &label, UnicodeString &dest,
124 labelToUnicode(const UnicodeString &label, UnicodeString &dest,
136 labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
140 labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
176 // returns the new label length
188 checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) const;
191 isLabelOkContextJ(const UChar *label, int32_t labelLength) const;
194 checkLabelContextO(const UChar *label, int32_t labelLength, IDNAInfo &info) const;
225 UTS46::labelToASCII(const UnicodeString &label, UnicodeString &dest,
227 return process(label, TRUE, TRUE, dest, info, errorCode);
231 UTS46::labelToUnicode(const UnicodeString &label, UnicodeString &dest,
233 return process(label, TRUE, FALSE, dest, info, errorCode);
256 UTS46::labelToASCII_UTF8(const StringPiece &label, ByteSink &dest,
258 processUTF8(label, TRUE, TRUE, dest, info, errorCode);
262 UTS46::labelToUnicodeUTF8(const StringPiece &label, ByteSink &dest,
264 processUTF8(label, TRUE, FALSE, dest, info, errorCode);
371 // label starts with "-"
375 // label ends with "-"
385 // Permit an empty label at the end but not elsewhere.
475 // label starts with "-"
479 // label ends with "-"
487 // Permit an empty label at the end but not elsewhere.
501 // Convert the processed ASCII prefix of the current label to UTF-16.
586 // Permit an empty label at the end (0<labelStart==labelLimit==destLength is ok)
587 // but not an empty label elsewhere nor a completely empty domain name.
671 // Replace the label in dest with the label string, if the label was modified.
672 // If &label==&dest then the label was modified in-place and labelLength
673 // is the new label length, different from label.length().
674 // If &label!=&dest then labelLength==label.length().
675 // Returns labelLength (= the new label length).
678 const UnicodeString &label, int32_t labelLength) {
679 if(&label!=&dest) {
680 dest.replace(destLabelStart, destLabelLength, label);
692 const UChar *label=dest.getBuffer()+labelStart;
696 if(labelLength>=4 && label[0]==0x78 && label[1]==0x6e && label[2]==0x2d && label[3]==0x2d) {
706 int32_t unicodeLength=u_strFromPunycode(label+4, labelLength-4,
717 unicodeLength=u_strFromPunycode(label+4, labelLength-4,
742 label=fromPunycode.getBuffer();
757 if(labelLength>=4 && label[2]==0x2d && label[3]==0x2d) {
758 // label starts with "??--"
761 if(label[0]==0x2d) {
762 // label starts with "-"
765 if(label[labelLength-1]==0x2d) {
766 // label ends with "-"
769 // If the label was not a Punycode label, then it was the result of
770 // mapping, normalization and label segmentation.
771 // If the label was in Punycode, then we mapped it again above
775 // in a non-Punycode label or U+FFFD itself in a Punycode label.
776 // We also check for dots which can come from the input to a single-label function.
778 UChar *s=(UChar *)label;
779 const UChar *limit=label+labelLength;
809 U16_NEXT_UNSAFE(label, cpLength, c);
813 label=labelString->getBuffer()+labelStart;
823 checkLabelBiDi(label, labelLength, info);
826 !isLabelOkContextJ(label, labelLength)
831 checkLabelContextO(label, labelLength, info);
835 // Leave a Punycode label unchanged if it has no severe errors.
843 UChar *buffer=punycode.getBuffer(63); // 63==maximum DNS label length
852 int32_t punycodeLength=u_strToPunycode(label, labelLength,
863 punycodeLength=u_strToPunycode(label, labelLength,
878 // all-ASCII label
885 // If a Punycode label has severe errors,
895 // Make sure an ACE label does not look valid.
896 // Append U+FFFD if the label has only LDH characters.
905 const UChar *label=dest.getBuffer()+labelStart;
907 UChar *s=(UChar *)label+4; // After the initial "xn--".
908 const UChar *limit=label+labelLength;
958 // We scan the whole label and check both for whether it contains RTL characters
961 // that a domain name is a BiDi domain name (has an RTL label) only after
964 UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) const {
969 U16_NEXT_UNSAFE(label, i, c);
972 // or AL. If it has the R or AL property, it is an RTL label; if it
973 // has the L property, it is an LTR label.
984 U16_PREV_UNSAFE(label, labelLength, c);
991 // 3. In an RTL label, the end of the label must be a character with
994 // 6. In an LTR label, the end of the label must be a character with
1006 U16_NEXT_UNSAFE(label, i, c);
1010 // 5. In an LTR label, only characters with the BIDI properties L, EN,
1016 // 2. In an RTL label, only characters with the BIDI properties R, AL,
1021 // 4. In an RTL label, if an EN is present, no AN may be present, and
1027 // An RTL label is a label that contains at least one character of type
1030 // label. [...]
1043 // 5. In an LTR label, only characters with the BIDI properties L, EN,
1045 // 6. In an LTR label, the end of the label must be a character with
1060 // Last character in the label is not an L or EN.
1067 // First character in the label is not an L.
1072 // Intermediate character in the label is a B, S or WS.
1092 // Last character in the label is not an L or EN.
1099 // First character in the label is not an L.
1104 // Intermediate character in the label is a B, S or WS.
1113 UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const {
1118 if(label[i]==0x200c) {
1130 U16_PREV_UNSAFE(label, j, c);
1141 U16_PREV_UNSAFE(label, j, c);
1153 U16_NEXT_UNSAFE(label, j, c);
1163 } else if(label[i]==0x200d) {
1173 U16_PREV_UNSAFE(label, j, c);
1183 UTS46::checkLabelContextO(const UChar *label, int32_t labelLength, IDNAInfo &info) const {
1187 UChar32 c=label[i];
1197 if(!(0<i && label[i-1]==0x6c &&
1198 i<labelEnd && label[i+1]==0x6c)) {
1210 U16_NEXT(label, j, labelLength, c);
1230 U16_PREV(label, 0, j, c);
1275 U16_NEXT(label, j, labelLength, c);
1302 checkArgs(const void *label, int32_t length,
1313 if( (label==NULL ? length!=0 : length<-1) ||
1315 (dest==label && label!=NULL)
1333 const UChar *label, int32_t length,
1336 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1339 UnicodeString src((UBool)(length<0), label, length);
1349 const UChar *label, int32_t length,
1352 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1355 UnicodeString src((UBool)(length<0), label, length);
1397 const char *label, int32_t length,
1400 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1403 StringPiece src(label, length<0 ? uprv_strlen(label) : length);
1413 const char *label, int32_t length,
1416 if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) {
1419 StringPiece src(label, length<0 ? uprv_strlen(label) : length);