Commit Graph

41 Commits

Author SHA1 Message Date
Maxime Coste
5ebd588e5f remove unused memoryview<char> String::data 2014-04-21 00:26:20 +01:00
Maxime Coste
63a0b9d22a Add a zstr() method to StringView that returns a zero terminated string holder 2014-04-21 00:26:20 +01:00
Maxime Coste
c4295b7e30 Fix StringView::substr when passed a negative length 2014-04-20 12:03:57 +01:00
Maxime Coste
af2d82dfc1 Add StringView class for non owning string 2014-04-18 13:47:39 +01:00
Maxime Coste
a7e6e5b936 Remove unimplemented String::replace method 2014-04-18 13:19:07 +01:00
Maxime Coste
e0424ba017 Minor formatting fixes (very long lines) 2014-04-08 20:09:54 +01:00
Maxime Coste
e6884f989c Style changes, replace typedefs with usings 2014-01-09 19:59:26 +00:00
Maxime Coste
04ae48c346 indent cleanup, correct erroneous 3 spaces indent 2013-11-14 00:12:15 +00:00
Maxime Coste
bab10f5b93 add subsequence_match(str, subseq) utility function 2013-09-23 21:17:16 +02:00
Maxime Coste
5ae43acf94 Add prefix_match function and use it instead of adhoc code 2013-09-23 21:16:25 +02:00
Maxime Coste
b5db256384 string escaping support functions
the split function now takes an additional escape parameter and
does not split on separators that have the escaper before it.

An utility escape function that adds escape before separators
is also added.
2013-07-24 22:37:17 +02:00
Maxime Coste
6d125e6c36 do not use std::{to_string,stoi} as they cause problems with cygwin 2013-06-19 19:29:05 +01:00
Maxime Coste
c3d53d588d revive str_to_int so that the good exception type is thrown on error 2013-05-17 14:09:42 +02:00
Maxime Coste
26f0fd4cc6 Use more std::* for string handling 2013-05-13 18:43:38 +02:00
Maxime Coste
385241d2c0 remove String::replace, use boost::regex_replace directly 2013-04-12 19:16:55 +02:00
Maxime Coste
270e950cf1 sort includes directives 2013-04-09 20:05:40 +02:00
Maxime Coste
b266035c71 fix String::String(Codepoint, CharCount) 2013-04-02 13:42:24 +02:00
Maxime Coste
a80cee0d2c Add support for tuple Options, implement LineAndFlag using that 2013-03-29 19:35:48 +01:00
Maxime Coste
01968cb96e String: inherit from std::string rather than using it as a backend 2013-03-29 19:35:48 +01:00
Maxime Coste
9f9ad58b39 utf8::dump uses a copy of the output iterator instead of a reference 2013-02-27 23:50:33 +01:00
Maxime Coste
72531f2df0 string: remove unneeded headers 2013-02-27 21:26:12 +01:00
Maxime Coste
99475f93d9 String: add rbegin/rend methods 2013-02-27 19:58:24 +01:00
Maxime Coste
ffc5a4a334 Add a String(Codepoint, CharCount) constructor 2013-02-26 14:28:20 +01:00
Maxime Coste
dc8803e41b String: use a CharCount instead of a size_t in String(char, CharCount) 2013-02-25 19:25:32 +01:00
Maxime Coste
9c2bbe218b replace char: fix unicode handling 2013-01-17 19:49:48 +01:00
Maxime Coste
dca05ecc73 small code tweak 2012-11-23 18:48:04 +01:00
Maxime Coste
53be5c87d2 String: add non const front() and back() methods 2012-11-23 18:41:33 +01:00
Maxime Coste
214baf4cdd add a _str user defined literal to create String 2012-10-16 15:11:22 +02:00
Maxime Coste
0ce6bd9bf5 use ByteCount instead of CharCount when we are really counting bytes
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
7a8366da2b add a unicode.hh header for Codepoint related functions, s/utf8::Codepoint/Codepoint/ 2012-10-09 19:15:05 +02:00
Maxime Coste
c7272e427d get rid of Character 2012-10-08 19:33:53 +02:00
Maxime Coste
4b0ccb0437 String and BufferIterator value_type goes back to plain char 2012-10-01 20:20:08 +02:00
Maxime Coste
430765e132 extract is_alpha to string.hh 2012-09-30 16:23:18 +02:00
Maxime Coste
2825bc3d7b Fix escaped whitespace handling in command manager 2012-08-29 21:50:48 +02:00
Maxime Coste
bbce6b22a3 remove regex.hh, define Regex directly in string.hh 2012-08-29 21:49:36 +02:00
Maxime Coste
e4fd839dda use a strongly typed int CharCount for character counts 2012-08-23 23:56:35 +02:00
Maxime Coste
ecb3a737a9 Tweak String class, and cleanup usages
remove String::clear, add operator=(String&&) add str_to_int(const String&)
to replace atoi.
2012-06-27 14:26:29 +02:00
Maxime Coste
942e63d836 correctly implement std::hash<String> 2012-05-30 14:20:21 +02:00
Maxime Coste
62202a46c1 Add some string helpers and unit tests
functions int_to_str(int) and split(const String&, Character),
plus corresponding unit tests
2012-05-29 05:19:50 +00:00
Maxime Coste
b8fe942dbb Implement our own String class in preparation to encoding support. 2012-04-14 01:23:20 +00:00
Maxime Coste
9337938403 replace std::string references with String 2012-04-14 01:17:09 +00:00