This file is indexed.

/usr/share/doc/libbobcat2-dev/man/string.3.html is in libbobcat-dev 2.20.01-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<html><head>
<title>FBB::String</title>
<link rev="made" href="mailto:Frank B. Brokken: f.b.brokken@rug.nl">
</head>
<body text="#27408B" bgcolor="#FFFAF0">
<hr>
<h1>FBB::String</h1>
<h2>libbobcat1-dev_2.20.01-x.tar.gz</h2>
<h2>2005-2011</h2>

<html><head>
<link rev="made" href="mailto:Frank B. Brokken: f.b.brokken@rug.nl">
</head>
<body text="#27408B" bgcolor="#FFFAF0">
<hr>
<h1></h1>

<html><head>
<title>FBB::String(3bobcat)</title>
<link rev="made" href="mailto:Frank B. Brokken: f.b.brokken@rug.nl">
</head>
<body text="#27408B" bgcolor="#FFFAF0">
<hr>
<h1>FBB::String(3bobcat)</h1>
<h2>libbobcat1-dev_2.20.01-x.tar.gz Error handler</h2>
<h2>2005-2011</h2>


<p>
<h2>NAME</h2>FBB::String - Several extensions to <strong>std::string</strong>
<p>
<h2>SYNOPSIS</h2>
    <strong>#include &lt;bobcat/string&gt;</strong><br>
    Linking option: <em>-lbobcat</em> 
<p>
<h2>DESCRIPTION</h2>
    This class offers the same functionality as <strong>std::string</strong>, adding
facilities for often used transformations, currently missing in
<strong>std::string</strong>.  
<p>
<h2>NAMESPACE</h2>
    <strong>FBB</strong><br>
    All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace <strong>FBB</strong>.
<p>
<h2>INHERITS FROM</h2>
    --
<p>
<h2>ENUMERATION</h2>
    <ul>
    <li> <strong>Type</strong>:<br>
       This enumeration has the following values, which are used in the second
        variant of the <strong>split</strong> member (see below): 
<p>
<strong>DQUOTE</strong>, a series of characters surrounded by double quotes
in the original string; 
<p>
<strong>DQUOTE_UNTERMINATED</strong>, a series of characters beginning with
a double quote in the original string, but lacking the matching terminating
double quote;
<p>
<strong>ESCAPED_END</strong>, a series of characters representing an
otherwise normal string, but terminating in a plain backslash;
<p>
<strong>NORMAL</strong>, a normal string; 
<p>
<strong>SEPARATOR</strong>, a separator;
<p>
<strong>SQUOTE</strong>, a series of characters surrounded by single quotes
in the original string; 
<p>
<strong>SQUOTE_UNTERMINATED</strong>, a series of characters beginning with
a single quote in the original string, but lacking the matching terminating
single quote.
    </ul>
<p>
<h2>TYPEDEF</h2>
<p>
The <strong>typedef SplitPair</strong> represents <strong>std::pair&lt;std::string,
String::Type&gt;</strong> and is used in the second variant of the <strong>split</strong> member (see
below).
<p>
<h2>HISTORY</h2>
    Initially this class was derived from <strong>std::string</strong>. Deriving from
<strong>std::string</strong>, however, is considerd bad design as <em>std::string</em> was
not designed as a base-class. 
<p>
Currently <strong>String</strong> offers a series of <em>static</em> member functions
providing the facilities originally implemented in non-static members.
<p>
<h2>STATIC MEMBER FUNCTIONS</h2>
    <ul>
    <li> <strong>char const **argv(std::vector&lt;std::string&gt; const &amp;words)</strong>:<br>
        Returns a pointer to an allocated series of pointers to the <strong>C</strong>
strings stored in the vector <em>words</em>. The caller is responsible for
returning the array of pointers to the common pool, but should <em>not</em> delete
the <strong>C</strong>-strings to which the pointers point. The last element of the
returned array is guaranteed to be a 0-pointer. 
    <li> <strong>int casecmp(std::string const &amp;lhs, std::string const &amp;rhs)</strong>:<br>
        Performs a case-insensitive comparison between the two <em>std::string</em>
objects. A negative value is returned if <em>lhs</em> should be ordered before
<em>rhs</em>; 0 is returned if the two strings have identical contents; a
positive value is returned if the <em>lhs</em> object should be ordered beyond
<em>rhs</em>.
    <li> <strong>std::string escape(std::string const &amp;str, 
            char const *series = "'\"\\")</strong>:<br>
        Returns a copy of the <em>str</em> object in which all characters in
<em>series</em> are prefixed by a backslash character.
    <li> <strong>std::string lc(std::string const &amp;str) const</strong>:<br>
        Returns a copy of the <em>str</em> object in which all letters were
transformed to lower case letters.
    <li> <strong>std::string trim(std::string const &amp;str)</strong>:<br>
        Returns a copy of the <em>str</em> object from which the leading and
trailing blanks have been removed.
    <li> <strong>size_t split(std::vector&lt;std::string&gt; *words,
                    std::string const &amp;str,
                    char const *separators = " \t", bool addEmpty = false)</strong>:<br>
        Fills <em>words</em> with all elements of the <em>str</em> object, separated by
any of the characters in <em>separators</em>. If the parameter <em>addEmpty</em> is set
to <em>true</em>, the individual separators are stored as empty strings in
<em>words</em>. If a word starts with <em>"</em> or <em>'</em> all characters until a
matching terminating <em>"</em> or <em>'</em> at the end of a word are considered as one
word.  The surrounding quotes are not stored. The function returns the number
of elements in the vector pointed to by <em>words</em>. This vector is initially
cleared.
    <li> <strong>size_t  split(std::vector&lt;SplitPair&gt; *words,
                    std::string const &amp;str,
                    char const *separators = " \t", bool addEmpty = false)</strong>:<br>
        Same functionality as the former member, but the <em>words</em> vector is
filled with pairs, of which the first elements are the recognized strings, and
the second elements values of the <em>String::Type</em> enumeration. If
<strong>addEmpty</strong> is requested, then the <strong>string</strong> elements contain the actual
contents of the separator, while the <strong>Type</strong> elements are set to
<strong>SEPARATOR</strong>.
    <li> <strong>std::string unescape(std::string const &amp;str)</strong>:<br>
        Returns a copy of the <em>str</em> object in which the escaped (i.e.,
prefixed by a backslash) characters have been interpreted. All standard escape
characters (<em>\a</em>, <em>\b</em>, <em>\f</em>, <em>\n</em>, <em>\r</em>, <em>\t</em>, <em>\v</em>) are
recognized. If an escape character is followed by <em>x</em> the next two
characters are interpreted as a hexadecimal number. If an escape character is
followed by an octal digit, then the next three characters following the
backslash are interpreted as an octal number. In all other cases, the
backslash is removed and the character following the backslash is kept.
    <li> <strong>std::string uc(std::string const &amp;str)</strong>:<br>
        Returns a copy of the <em>str</em> object in which all letters were
capitalized. 
    </ul>
<p>
<h2>EXAMPLE</h2>
    <pre>

#include &lt;iostream&gt;
#include &lt;vector&gt;

#include &lt;bobcat/string&gt;

using namespace std;
using namespace FBB;

char const *type[] = 
{
    "DQUOTE_UNTERMINATED",
    "SQUOTE_UNTERMINATED",
    "ESCAPED_END",
    "SEPARATOR",
    "NORMAL",
    "DQUOTE",
    "SQUOTE",
};

int main(int argc, char **argv)
{
    cout &lt;&lt; "Program's name in uppercase: " &lt;&lt; String::uc(argv[0]) &lt;&lt; endl;

    if (argc == 1)
        cout &lt;&lt; "Provide any argument to suppress SEPARATOR fields\n";

    while (true)
    {
        cout &lt;&lt; "Enter a line, or empty line to stop:" &lt;&lt; endl;

        String line;
        if (!getline(cin, line) || !line.length())
            break;

        vector&lt;String::SplitPair&gt; splitpair;
        cout &lt;&lt; "Split into " &lt;&lt; line.split(&amp;splitpair, " \t", argc == 1) &lt;&lt; 
                " fields\n"; 
        for 
        (
            vector&lt;String::SplitPair&gt;::iterator it = splitpair.begin();
                it != splitpair.end();
                    ++it
        )
            cout &lt;&lt; (it - splitpair.begin() + 1) &lt;&lt; ": " &lt;&lt;
                    type[it-&gt;second] &lt;&lt; ": `" &lt;&lt; it-&gt;first &lt;&lt; 
                    "', unescaped: `" &lt;&lt; String(it-&gt;first).unescape() &lt;&lt; 
                    "'" &lt;&lt; endl;
    }
    return 0;
}
    
</pre>

<p>
<h2>FILES</h2>
    <em>bobcat/string</em> - defines the class interface
<p>
<h2>SEE ALSO</h2>
    <strong>bobcat</strong>(7)
<p>
<h2>BUGS</h2>
    None Reported.
<p>

<h2>DISTRIBUTION FILES</h2>
    <ul>
    <li> <em>bobcat_2.20.01-x.dsc</em>: detached signature;
    <li> <em>bobcat_2.20.01-x.tar.gz</em>: source archive;
    <li> <em>bobcat_2.20.01-x_i386.changes</em>: change log;
    <li> <em>libbobcat1_2.20.01-x_*.deb</em>: debian package holding the
            libraries;
    <li> <em>libbobcat1-dev_2.20.01-x_*.deb</em>: debian package holding the
            libraries, headers and manual pages;
    <li> <em>http://sourceforge.net/projects/bobcat</em>: public archive location;
    </ul>
<p>
<h2>BOBCAT</h2>
    Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
<p>
<h2>COPYRIGHT</h2>
    This is free software, distributed under the terms of the 
    GNU General Public License (GPL).
<p>
<h2>AUTHOR</h2>
    Frank B. Brokken (<strong>f.b.brokken@rug.nl</strong>).
<p>