monotone

monotone Mtn Source Tree

Root/simplestring_xform.hh

1#ifndef __SIMPLESTRING_XFORM_HH__
2#define __SIMPLESTRING_XFORM_HH__
3
4#include <vector>
5#include <string>
6
7std::string uppercase(std::string const & in);
8std::string lowercase(std::string const & in);
9
10void split_into_lines(std::string const & in,
11 std::vector<std::string> & out);
12
13void split_into_lines(std::string const & in,
14 std::string const & encoding,
15 std::vector<std::string> & out);
16
17void join_lines(std::vector<std::string> const & in,
18 std::string & out,
19 std::string const & linesep);
20
21void join_lines(std::vector<std::string> const & in,
22 std::string & out);
23
24void prefix_lines_with(std::string const & prefix,
25 std::string const & lines,
26 std::string & out);
27
28// append after removing all whitespace
29void append_without_ws(std::string &appendto, std::string const & s);
30
31// remove all whitespace
32std::string remove_ws(std::string const & s);
33
34// remove leading and trailing whitespace
35std::string trim_ws(std::string const & s);
36
37// line-ending conversion
38void line_end_convert(std::string const & linesep, std::string const & src, std::string & dst);
39
40// Local Variables:
41// mode: C++
42// fill-column: 76
43// c-file-style: "gnu"
44// indent-tabs-mode: nil
45// End:
46// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
47
48#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status