ne_shave.3 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. '\" t
  2. .\" Title: ne_shave
  3. .\" Author:
  4. .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
  5. .\" Date: 23 November 2024
  6. .\" Manual: neon API reference
  7. .\" Source: neon 0.34.0
  8. .\" Language: English
  9. .\"
  10. .TH "NE_SHAVE" "3" "23 November 2024" "neon 0.34.0" "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_shave \- trim whitespace from a string
  32. .SH "SYNOPSIS"
  33. .sp
  34. .ft B
  35. .nf
  36. #include <ne_string\&.h>
  37. .fi
  38. .ft
  39. .HP \w'char\ *ne_shave('u
  40. .BI "char *ne_shave(char\ *" "str" ", const\ char\ *" "whitespace" ");"
  41. .SH "DESCRIPTION"
  42. .PP
  43. \fBne_shave\fR
  44. returns a portion of
  45. \fIstr\fR
  46. with any leading or trailing characters in the
  47. \fIwhitespace\fR
  48. array removed\&.
  49. \fIstr\fR
  50. may be modified\&. Note that the return value may not be equal to
  51. \fIstr\fR\&.
  52. .SH "EXAMPLES"
  53. .PP
  54. The following code segment will output
  55. "fish":
  56. .sp
  57. .if n \{\
  58. .RS 4
  59. .\}
  60. .nf
  61. char s[] = "\&.!\&.fish!\&.!";
  62. puts(ne_shave(s, "\&.!"));
  63. .fi
  64. .if n \{\
  65. .RE
  66. .\}
  67. .SH "COPYRIGHT"
  68. .br
  69. Copyright \(co 2001-2024 Joe Orton
  70. .br