1
1
/*****************************************************************************
3
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
3
Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
489
489
return(src_size);
492
/**********************************************************************//**
493
Make a quoted copy of a NUL-terminated string. Leading and trailing
494
quotes will not be included; only embedded quotes will be escaped.
495
See also ut_strlenq() and ut_memcpyq().
496
@return pointer to end of dest */
501
char* dest, /*!< in: output buffer */
502
char q, /*!< in: the quote character */
503
const char* src) /*!< in: null-terminated string */
506
if ((*dest++ = *src++) == q) {
514
/**********************************************************************//**
515
Make a quoted copy of a fixed-length string. Leading and trailing
516
quotes will not be included; only embedded quotes will be escaped.
517
See also ut_strlenq() and ut_strcpyq().
518
@return pointer to end of dest */
523
char* dest, /*!< in: output buffer */
524
char q, /*!< in: the quote character */
525
const char* src, /*!< in: string to be quoted */
526
ulint len) /*!< in: length of src */
528
const char* srcend = src + len;
530
while (src < srcend) {
531
if ((*dest++ = *src++) == q) {
539
492
#ifndef UNIV_HOTBACKUP
540
493
/**********************************************************************//**
541
494
Return the number of times s2 occurs in s1. Overlapping instances of s2