ne_buffer_clear.3 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. '\" t
  2. .\" Title: ne_buffer_clear
  3. .\" Author:
  4. .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
  5. .\" Date: 21 January 2023
  6. .\" Manual: neon API reference
  7. .\" Source: neon 0.32.5
  8. .\" Language: English
  9. .\"
  10. .TH "NE_BUFFER_CLEAR" "3" "21 January 2023" "neon 0.32.5" "neon API reference"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. ne_buffer_clear, ne_buffer_grow, ne_buffer_altered \- clear, grow, or mark as altered a string buffer
  32. .SH "SYNOPSIS"
  33. .sp
  34. .ft B
  35. .nf
  36. #include <ne_string\&.h>
  37. .fi
  38. .ft
  39. .HP \w'void\ ne_buffer_clear('u
  40. .BI "void ne_buffer_clear(ne_buffer\ *" "buf" ");"
  41. .HP \w'void\ ne_buffer_altered('u
  42. .BI "void ne_buffer_altered(ne_buffer\ *" "buf" ");"
  43. .HP \w'void\ ne_buffer_grow('u
  44. .BI "void ne_buffer_grow(ne_buffer\ *" "buf" ", size_t\ " "size" ");"
  45. .SH "DESCRIPTION"
  46. .PP
  47. The
  48. \fBne_buffer_clear\fR
  49. function sets the string stored in
  50. \fIbuf\fR
  51. to be the empty string ("")\&.
  52. .PP
  53. The
  54. \fBne_buffer_altered\fR
  55. function must be used after the string stored in the buffer
  56. \fIbuf\fR
  57. is modified by directly rather than using
  58. ne_buffer_append,
  59. ne_buffer_zappend
  60. or
  61. ne_buffer_concat\&.
  62. .PP
  63. The
  64. \fBne_buffer_grow\fR
  65. function ensures that at least
  66. \fIsize\fR
  67. bytes are allocated for the string; this can be used if a large amount of data is going to be appended to the buffer and may result in more efficient memory allocation\&.
  68. .SH "AUTHOR"
  69. .PP
  70. \fBJoe Orton\fR
  71. .RS 4
  72. Author.
  73. .RE
  74. .SH "COPYRIGHT"
  75. .br