comparison xml/en/docs/dev/development_guide.xml @ 1998:18404f5a5600

DevGuide: string initialization macros.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 14 Jun 2017 14:13:57 +0300
parents eeb9cb8f8a54
children 1b086de6a05b
comparison
equal deleted inserted replaced
1997:eeb9cb8f8a54 1998:18404f5a5600
394 <literal>ngx_strncasecmp()</literal> 394 <literal>ngx_strncasecmp()</literal>
395 </listitem> 395 </listitem>
396 396
397 </list> 397 </list>
398 </para> 398 </para>
399
400 <para>
401 The following macros simplify string initialization:
402 </para>
403
404 <list type="bullet">
405
406 <listitem>
407 <literal>ngx_string(text)</literal> — static initializer for the
408 <literal>ngx_str_t</literal> type from the C string literal
409 <literal>text</literal>
410 </listitem>
411
412 <listitem>
413 <literal>ngx_null_string</literal> — static empty string initializer for the
414 <literal>ngx_str_t</literal> type
415 </listitem>
416
417 <listitem>
418 <literal>ngx_str_set(str, text)</literal> — initializes string
419 <literal>str</literal> of <literal>ngx_str_t *</literal> type with the C string
420 literal <literal>text</literal>
421 </listitem>
422
423 <listitem>
424 <literal>ngx_str_null(str)</literal> — initializes string <literal>str</literal>
425 of <literal>ngx_str_t *</literal> type with the empty string
426 </listitem>
427
428 </list>
399 429
400 </section> 430 </section>
401 431
402 432
403 <section name="Formatting" id="formatting"> 433 <section name="Formatting" id="formatting">