*outChar++ = '+'; } else if ( (((*inChar - '0') >= 0) && (('9' - *inChar) >= 0)) || (((*inChar - 'a') >= 0) && (('z' - *inChar) >= 0)) || (((*inChar - 'A') >= 0) && (('Z' - *inChar) >= 0)) ) { *outChar++ = *inChar; } else { *outChar++ = '%';
*outChar++ = '+'; } else if ( (((*inChar - '0') >= 0) && (('9' - *inChar) >= 0)) || (((*inChar - 'a') >= 0) && (('z' - *inChar) >= 0)) || (((*inChar - 'A') >= 0) && (('Z' - *inChar) >= 0)) || ('.' == *inChar) || ('_' == *inChar)) { *outChar++ = *inChar; } else { *outChar++ = '%';
void URLEncode(char* aInString, char* aOutString){  if (nsnull == aInString) {	return;  }  static char *toHex = "0123456789ABCDEF";  char* outChar = aOutString;  for (char* inChar = aInString; *inChar; inChar++) {    if(' ' == *inChar) {                                     // convert space to +	  *outChar++ = '+';	} else if ( (((*inChar - '0') >= 0) && (('9' - *inChar) >= 0)) || // don't conver                 (((*inChar - 'a') >= 0) && (('z' - *inChar) >= 0)) || // alphanumeric				(((*inChar - 'A') >= 0) && (('Z' - *inChar) >= 0)) ) {	  *outChar++ = *inChar;	} else {                                                 // convert all else to hex	  *outChar++ = '%';      *outChar++ = toHex[(*inChar >> 4) & 0x0F];      *outChar++ = toHex[*inChar & 0x0F];	}  }  *outChar = 0;  // terminate the string}