Hi Roland,

+                       case '\0':
+                               buf_len += zend_codepoint_to_uchar('\\', 
buf+buf_len);
+                               buf_len += zend_codepoint_to_uchar('0', 
buf+buf_len);
+                               break;

If you know that the codepoint you're adding is in the BMP it's more efficient to append it to the buffer directly.

        *buf = (UChar) 0x5c; /* '\\' */
         buf_len++;
        *buf = (UChar) 0x30; /* '0' */
         buf_len++;

-Andrei

On Sep 28, 2005, at 2:22 AM, Rolland Santimano wrote:

rolland         Wed Sep 28 05:22:14 2005 EDT

  Modified files:
    /php-src/ext/standard       php_string.h string.c
  Log:
  - Unicode impl of {add,strip}slashes()

<rolland-20050928052214.txt>--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to