函数源码 |
Source File:lib\string_helpers.c |
Create Date:2022-07-27 07:23:08 |
首页 | Copyright©Brick |
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | static bool escape_special(unsigned char c, char **dst, char *end) { char *out = *dst; unsigned char to; switch (c) { case '\\' : to = '\\' ; break ; case '\a' : to = 'a' ; break ; case '\e' : to = 'e' ; break ; default : return false ; } if (out < end) *out = '\\' ; ++out; if (out < end) *out = to; ++out; *dst = out; return true ; } |