Lines Matching refs:len
262 string->len = 0; in stringInit8()
299 string->len = 0; in stringInitUTF16()
337 string->len = 0; in stringInitUTF8()
351 return string->factory->newPtr(string->factory, (pANTLR3_UINT8)(string->chars), string->len); in toUTF8_8()
382 utf8String->size = string->len *3; in toUTF8_UTF16()
395 ((const UTF16 *)(string->chars)) + string->len, in toUTF8_UTF16()
405 utf8String->len = ANTLR3_UINT32_CAST(((pANTLR3_UINT8)outputEnd) - utf8String->chars); in toUTF8_UTF16()
496 string->len = size; in newPtr8()
544 string->len = size; in newPtrUTF16_8()
580 string->len = size; in newPtrUTF16_UTF16()
688 string = factory->newSize(factory, instr->len *2 + 1); in printable8()
695 for (i = 0; i < instr->len; i++) in printable8()
718 string->len = (ANTLR3_UINT32)(scannedText - string->chars); in printable8()
737 string = factory->newSize(factory, instr->len *2 + 1); in printableUTF16()
746 for (i = 0; i < instr->len; i++) in printableUTF16()
773 string->len = outLen; in printableUTF16()
797 ANTLR3_UINT32 len; in append8() local
799 len = (ANTLR3_UINT32)strlen(newbit); in append8()
801 if (string->size < (string->len + len + 1)) in append8()
803 …rs = (pANTLR3_UINT8) ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(string->len + len + 1)); in append8()
804 string->size = string->len + len + 1; in append8()
809 ANTLR3_MEMMOVE((void *)(string->chars + string->len), newbit, (ANTLR3_UINT32)(len+1)); in append8()
810 string->len += len; in append8()
818 ANTLR3_UINT32 len; in appendUTF16_8() local
822 len = (ANTLR3_UINT32)strlen(newbit); in appendUTF16_8()
824 if (string->size < (string->len + len + 1)) in appendUTF16_8()
826 …3_REALLOC((void *)string->chars, (ANTLR3_UINT32)((sizeof(ANTLR3_UINT16)*(string->len + len + 1)))); in appendUTF16_8()
827 string->size = string->len + len + 1; in appendUTF16_8()
830 apPoint = ((pANTLR3_UINT16)string->chars) + string->len; in appendUTF16_8()
831 string->len += len; in appendUTF16_8()
833 for (count = 0; count < len; count++) in appendUTF16_8()
845 ANTLR3_UINT32 len; in appendUTF16_UTF16() local
851 len = 0; in appendUTF16_UTF16()
855 len++; in appendUTF16_UTF16()
858 if (string->size < (string->len + len + 1)) in appendUTF16_UTF16()
860 …_REALLOC((void *)string->chars, (ANTLR3_UINT32)( sizeof(ANTLR3_UINT16) *(string->len + len + 1) )); in appendUTF16_UTF16()
861 string->size = string->len + len + 1; in appendUTF16_UTF16()
866 …id *)(((pANTLR3_UINT16)string->chars) + string->len), newbit, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16… in appendUTF16_UTF16()
867 string->len += len; in appendUTF16_UTF16()
875 ANTLR3_UINT32 len; in set8() local
877 len = (ANTLR3_UINT32)strlen(chars); in set8()
878 if (string->size < len + 1) in set8()
880 string->chars = (pANTLR3_UINT8) ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(len + 1)); in set8()
881 string->size = len + 1; in set8()
886 ANTLR3_MEMMOVE((void *)(string->chars), chars, (ANTLR3_UINT32)(len+1)); in set8()
887 string->len = len; in set8()
896 ANTLR3_UINT32 len; in setUTF16_8() local
900 len = (ANTLR3_UINT32)strlen(chars); in setUTF16_8()
901 if (string->size < len + 1) in setUTF16_8()
903 …LR3_UINT8) ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16)*(len + 1))); in setUTF16_8()
904 string->size = len + 1; in setUTF16_8()
907 string->len = len; in setUTF16_8()
909 for (count = 0; count < string->len; count++) in setUTF16_8()
921 ANTLR3_UINT32 len; in setUTF16_UTF16() local
927 len = 0; in setUTF16_UTF16()
931 len++; in setUTF16_UTF16()
934 if (string->size < len + 1) in setUTF16_UTF16()
936 …LR3_UINT8) ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16)*(len + 1))); in setUTF16_UTF16()
937 string->size = len + 1; in setUTF16_UTF16()
942 … ANTLR3_MEMMOVE((void *)(string->chars), chars, (ANTLR3_UINT32)((len+1) * sizeof(ANTLR3_UINT16))); in setUTF16_UTF16()
943 string->len = len; in setUTF16_UTF16()
952 if (string->size < string->len + 2) in addc8()
954 …string->chars = (pANTLR3_UINT8) ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(string->len … in addc8()
955 string->size = string->len + 2; in addc8()
957 *(string->chars + string->len) = (ANTLR3_UINT8)c; in addc8()
958 *(string->chars + string->len + 1) = '\0'; in addc8()
959 string->len++; in addc8()
969 if (string->size < string->len + 2) in addcUTF16()
971 … ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16) * (string->len + 2))); in addcUTF16()
972 string->size = string->len + 2; in addcUTF16()
976 *(ptr + string->len) = (ANTLR3_UINT16)c; in addcUTF16()
977 *(ptr + string->len + 1) = '\0'; in addcUTF16()
978 string->len++; in addcUTF16()
1022 ANTLR3_UINT32 len; in insert8() local
1024 if (point >= string->len) in insert8()
1029 len = (ANTLR3_UINT32)strlen(newbit); in insert8()
1031 if (len == 0) in insert8()
1036 if (string->size < (string->len + len + 1)) in insert8()
1038 …rs = (pANTLR3_UINT8) ANTLR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(string->len + len + 1)); in insert8()
1039 string->size = string->len + len + 1; in insert8()
1044 …3_MEMMOVE((void *)(string->chars + point + len), (void *)(string->chars + point), (ANTLR3_UINT32)(… in insert8()
1048 ANTLR3_MEMMOVE((void *)(string->chars + point), newbit, (ANTLR3_UINT32)(len)); in insert8()
1050 string->len += len; in insert8()
1058 ANTLR3_UINT32 len; in insertUTF16_8() local
1062 if (point >= string->len) in insertUTF16_8()
1067 len = (ANTLR3_UINT32)strlen(newbit); in insertUTF16_8()
1069 if (len == 0) in insertUTF16_8()
1074 if (string->size < (string->len + len + 1)) in insertUTF16_8()
1076 …LR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16)*(string->len + len + 1))); in insertUTF16_8()
1077 string->size = string->len + len + 1; in insertUTF16_8()
1082 …ring->chars) + point + len), (void *)(((pANTLR3_UINT16)string->chars) + point), (ANTLR3_UINT32)(si… in insertUTF16_8()
1084 string->len += len; in insertUTF16_8()
1087 for (count = 0; count<len; count++) in insertUTF16_8()
1098 ANTLR3_UINT32 len; in insertUTF16_UTF16() local
1101 if (point >= string->len) in insertUTF16_UTF16()
1109 len = 0; in insertUTF16_UTF16()
1113 len++; in insertUTF16_UTF16()
1116 if (len == 0) in insertUTF16_UTF16()
1121 if (string->size < (string->len + len + 1)) in insertUTF16_UTF16()
1123 …LR3_REALLOC((void *)string->chars, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16)*(string->len + len + 1))); in insertUTF16_UTF16()
1124 string->size = string->len + len + 1; in insertUTF16_UTF16()
1129 …ring->chars) + point + len), (void *)(((pANTLR3_UINT16)string->chars) + point), (ANTLR3_UINT32)(si… in insertUTF16_UTF16()
1134 …*)(((pANTLR3_UINT16)string->chars) + point), newbit, (ANTLR3_UINT32)(sizeof(ANTLR3_UINT16)*(len))); in insertUTF16_UTF16()
1136 string->len += len; in insertUTF16_UTF16()
1150 if (newbit == NULL || newbit->len == 0 || newbit->size == 0 || newbit->chars == NULL) in appendS()
1250 if (offset > string->len) in charAt8()
1266 if (offset > string->len) in charAtUTF16()
1284 if (endIndex > string->len) in subString8()
1286 endIndex = string->len + 1; in subString8()
1301 if (endIndex > string->len) in subStringUTF16()
1303 endIndex = string->len + 1; in subStringUTF16()
1381 newStr->chars = (pANTLR3_UINT8) ANTLR3_MALLOC((size_t)(string->len + 1)); in to8_UTF16()
1382 newStr->size = string->len + 1; in to8_UTF16()
1383 newStr->len = string->len; in to8_UTF16()
1388 for (i=0; i<string->len; i++) in to8_UTF16()
1399 *(newStr->chars + newStr->len) = '\0'; in to8_UTF16()