410
410
/**************************************************************************
411
Make a quoted copy of a NUL-terminated string. Leading and trailing
412
quotes will not be included; only embedded quotes will be escaped.
413
See also ut_strlenq() and ut_memcpyq(). */
418
/* out: pointer to end of dest */
419
char* dest, /* in: output buffer */
420
char q, /* in: the quote character */
421
const char* src) /* in: null-terminated string */
424
if ((*dest++ = *src++) == q) {
432
/**************************************************************************
433
Make a quoted copy of a fixed-length string. Leading and trailing
434
quotes will not be included; only embedded quotes will be escaped.
435
See also ut_strlenq() and ut_strcpyq(). */
440
/* out: pointer to end of dest */
441
char* dest, /* in: output buffer */
442
char q, /* in: the quote character */
443
const char* src, /* in: string to be quoted */
444
ulint len) /* in: length of src */
446
const char* srcend = src + len;
448
while (src < srcend) {
449
if ((*dest++ = *src++) == q) {
457
/**************************************************************************
458
411
Return the number of times s2 occurs in s1. Overlapping instances of s2
459
412
are only counted once. */