blob: a5b745a26f21e5f2984b974c9efb8682ef4749f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<refentry id="refshave">
<refmeta>
<refentrytitle>ne_shave</refentrytitle>
<manvolnum>3</manvolnum>
</refmeta>
<refnamediv>
<refname>ne_shave</refname>
<refpurpose>trim whitespace from a string</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>#include <ne_string.h></funcsynopsisinfo>
<funcprototype>
<funcdef>char *<function>ne_shave</function></funcdef>
<paramdef>char *<parameter>str</parameter></paramdef>
<paramdef>const char *<parameter>whitespace</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><function>ne_shave</function> returns a portion of
<parameter>str</parameter> with any leading or trailing characters in
the <parameter>whitespace</parameter> array removed.
<parameter>str</parameter> may be modified.</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>The following code segment will output
<literal>"fish"</literal>:</para>
<programlisting>char s[] = ".!.fish!.!";
puts(ne_shave(s, ".!"));</programlisting>
</refsect1>
</refentry>
|