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
113
113
ulint n); /*!< in: try to allocate this many bytes */
114
114
#endif /* !UNIV_HOTBACKUP */
115
115
/**********************************************************************//**
116
Frees a memory block allocated with ut_malloc. */
116
Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is
209
210
ulint size); /*!< in: size of destination buffer */
211
212
/**********************************************************************//**
212
Compute strlen(ut_strcpyq(str, q)).
213
@return length of the string when quoted */
218
const char* str, /*!< in: null-terminated string */
219
char q); /*!< in: the quote character */
221
/**********************************************************************//**
222
Make a quoted copy of a NUL-terminated string. Leading and trailing
223
quotes will not be included; only embedded quotes will be escaped.
224
See also ut_strlenq() and ut_memcpyq().
225
@return pointer to end of dest */
230
char* dest, /*!< in: output buffer */
231
char q, /*!< in: the quote character */
232
const char* src); /*!< in: null-terminated string */
234
/**********************************************************************//**
235
Make a quoted copy of a fixed-length string. Leading and trailing
236
quotes will not be included; only embedded quotes will be escaped.
237
See also ut_strlenq() and ut_strcpyq().
238
@return pointer to end of dest */
243
char* dest, /*!< in: output buffer */
244
char q, /*!< in: the quote character */
245
const char* src, /*!< in: string to be quoted */
246
ulint len); /*!< in: length of src */
248
/**********************************************************************//**
249
213
Return the number of times s2 occurs in s1. Overlapping instances of s2
250
214
are only counted once.
251
215
@return the number of times s2 occurs in s1 */