Lines Matching defs:z
226 char *sqliteStrDup_(const char *z, char *zFile, int line){
228 if( z==0 ) return 0;
229 zNew = sqliteMalloc_(strlen(z)+1, 0, zFile, line);
230 if( zNew ) strcpy(zNew, z);
233 char *sqliteStrNDup_(const char *z, int n, char *zFile, int line){
235 if( z==0 ) return 0;
238 memcpy(zNew, z, n);
310 char *sqliteStrDup(const char *z){
312 if( z==0 ) return 0;
313 zNew = sqliteMallocRaw(strlen(z)+1);
314 if( zNew ) strcpy(zNew, z);
317 char *sqliteStrNDup(const char *z, int n){
319 if( z==0 ) return 0;
322 memcpy(zNew, z, n);
339 const char *z;
345 while( (z = va_arg(ap, const char*))!=0 ){
346 nByte += strlen(z);
357 while( (z = va_arg(ap, const char*))!=0 ){
358 strcpy(zResult, z);
379 const char *z;
386 while( (z = va_arg(ap, const char*))!=0 ){
388 if( n<=0 ) n = strlen(z);
396 while( (z = va_arg(ap, const char*))!=0 ){
398 if( n<=0 ) n = strlen(z);
399 strncpy(zResult, z, n);
416 ** %z A string that should be freed after use
440 void sqliteDequote(char *z){
443 if( z==0 ) return;
444 quote = z[0];
451 for(i=1, j=0; z[i]; i++){
452 if( z[i]==quote ){
453 if( z[i+1]==quote ){
454 z[j++] = quote;
457 z[j++] = 0;
461 z[j++] = z[i];
491 int sqliteHashNoCase(const char *z, int n){
493 if( n<=0 ) n = strlen(z);
495 h = (h<<3) ^ h ^ UpperToLower[(unsigned char)*z++];
521 ** Return TRUE if z is a pure numeric string. Return FALSE if the
526 int sqliteIsNumber(const char *z){
527 if( *z=='-' || *z=='+' ) z++;
528 if( !isdigit(*z) ){
531 z++;
532 while( isdigit(*z) ){ z++; }
533 if( *z=='.' ){
534 z++;
535 if( !isdigit(*z) ) return 0;
536 while( isdigit(*z) ){ z++; }
538 if( *z=='e' || *z=='E' ){
539 z++;
540 if( *z=='+' || *z=='-' ) z++;
541 if( !isdigit(*z) ) return 0;
542 while( isdigit(*z) ){ z++; }
544 return *z==0;
548 ** The string z[] is an ascii representation of a real number.
551 ** This routine assumes that z[] really is a valid number. If it
559 double sqliteAtoF(const char *z, const char **pzEnd){
562 if( *z=='-' ){
564 z++;
565 }else if( *z=='+' ){
566 z++;
568 while( isdigit(*z) ){
569 v1 = v1*10.0 + (*z - '0');
570 z++;
572 if( *z=='.' ){
574 z++;
575 while( isdigit(*z) ){
576 v1 = v1*10.0 + (*z - '0');
578 z++;
582 if( *z=='e' || *z=='E' ){
586 z++;
587 if( *z=='-' ){
589 z++;
590 }else if( *z=='+' ){
591 z++;
593 while( isdigit(*z) ){
594 eval = eval*10 + *z - '0';
595 z++;
607 if( pzEnd ) *pzEnd = z;
799 ** of space for the buffer z[].
801 void sqliteRealToSortable(double r, char *z){
817 *z++ = '-';
820 *z++ = '0';
845 strcpy(z, "~~~~~~~~~~~~");
848 *z++ = zDigit[(exp>>6)&0x3f];
849 *z++ = zDigit[exp & 0x3f];
855 *z++ = zDigit[digit & 0x3f];
859 *z = 0;
883 ** Convert the UTF-8 character to which z points into a 31-bit
884 ** UCS character. This only works right if z points to a well-formed
887 static int sqlite_utf8_to_int(const unsigned char *z){
909 c = initVal[*(z++)];
910 while( (0xc0&*z)==0x80 ){
911 c = (c<<6) | (0x3f&*(z++));
936 ** "[a-z]" matches any single lower-case letter. To match a '-', make