summaryrefslogtreecommitdiff
path: root/src/string.hh
AgeCommit message (Collapse)Author
2018-04-05Fix some trailing spaces and a tab that sneaked into the code baseMaxime Coste
2017-10-20Constexprify various hash functionsMaxime Coste
2017-10-10Move all non-core string code to string_utils.{hh,cc}Maxime Coste
2017-08-18Revert "Change HashCompatible trait to a variable template"Maxime Coste
This reverts commit b58f72315cbf7ee8921659dd129fd2f6a221bcfc. Unfortunately gcc-5.1 handling of variable template partial specializations is bugged.
2017-08-14Change HashCompatible trait to a variable templateMaxime Coste
2017-08-14Use decltype(auto) return type for some to_string functionsMaxime Coste
Remove explicit return type thats just duplicating the return expression.
2017-07-19Migrate code to c++14Maxime Coste
2017-07-09Remove assert in String::String(Codepoint, ColumnCount)Maxime Coste
codepoint_width is locale dependent, and we could end up with it returning a different value depending on the locale. It is better to return a string of the wrong column length than fail on assert in this case as we cannot fix it anyway. Fixes #1489
2017-06-26Formatting fixMaxime Coste
2017-06-23Use an HashMap to store options in option managerMaxime Coste
Turns out looking for options can get pretty slow, so O(1) lookup seems better. This should improve the performance of the #1460 issue
2017-06-16Trim whitespaces surrounding docstringsMaxime Coste
Closes #1439
2017-06-06Fix spurious copies being made when using the format functionMaxime Coste
We were not correctly forwarding the arguments, leading to copies of 'const String&' parameters.
2017-05-26Small code style tweakMaxime Coste
2017-03-06Introduce a custom HashMap implementation along with a quick benchmarkMaxime Coste
2017-01-29Make StringView and unit types trivial typesMaxime Coste
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-12-17Fix join, we dont have a StringView from char array constructorMaxime Coste
2016-12-17Escape the backslash chars as well when joining stringsMaxime Coste
Fixes #1014
2016-12-14Handle correctly cases where codepoint_width returns -1Maxime Coste
Fixes #972
2016-11-28Cleanup include dependencies a bitMaxime Coste
2016-10-31Add to_string(long long int) overload to fix OSX compilationMaxime Coste
2016-10-01Rename get_width to codepoint_widthMaxime Coste
2016-10-01Support codepoints of variable widthMaxime Coste
Add a ColumnCount type and use it in place of CharCount whenever more appropriate, take column size of codepoints into account for vertical movements and docstring wrapping. Fixes #811
2016-09-28Fix String::Data::reserve on big endian platforms, and document String::DataMaxime Coste
reserve was not ensuring the capacity would be pair, which is needed on big endian machines, as we use its least significant bit to flag short string optimizations. On little endian the bit we use is the 8th most significant (the least significant bit of the last byte), so we were not hitting any problems. Fixes #828
2016-09-26Assert substr from parameter is within the stringMaxime Coste
Should catch #756 earlier if it happens again.
2016-08-31Remove the to_string(unsigned) (it conflicts with to_string(size_t) on x86)Maxime Coste
Just cast to int when we pass an unsigned.
2016-08-27Add a to_string overload for unsigned intMaxime Coste
2016-08-06Add information of types of optionsMaxime Coste
2016-07-27Ensure we cannot call StringView::StringView{Codepoint}Maxime Coste
2016-06-19Add a String::resize methodMaxime Coste
2016-04-27Make use of strongly typed number to size_t conversionMaxime Coste
2016-02-13Do not allow / in highlighter names as it is used for hierachiesMaxime Coste
/ are replaced with <slash> in the highlighter names. Fixes #553
2016-02-10Use a custom SSO aware string backendMaxime Coste
2016-02-05More string usage cleanupMaxime Coste
2016-02-04String usage cleanupsMaxime Coste
2015-11-25Add a static const String::ms_empty empty stringMaxime Coste
2015-11-11Remove unneeded conversionMaxime Coste
2015-09-24Add Haiku support.Filip SzczepaƄski
2015-09-19Add simple markup support to generate display lines from stringsMaxime Coste
The syntax is simply {face} to enable the given face, use \{ to escape a {, and \\ to escape a \.
2015-08-18Smaller sizeof for in place stringsMaxime Coste
2015-07-14Add missing support for Codepoint in formatMaxime Coste
2015-06-22Add support for hex formattingMaxime Coste
2015-06-01Port more code to use the format function instead of adhoc string concatMaxime Coste
2015-05-29Return a String in Backtrace::descMaxime Coste
2015-05-26Retreat ! go back to C++11 only codeMaxime Coste
This reverts commit b42de850314e7d76f873ddc7d64c5f7d2a30eb00.
2015-05-25Migrate code to c++14Maxime Coste
2015-05-01Add str_to_int_ifp that returns an Optional<int> instead of throwingMaxime Coste
2015-04-22Add format_to allowing formating to an existing bufferMaxime Coste
2015-04-07Always optimize StringView::strlen (recursive due to constexpr)Maxime Coste
2015-03-31number to string conversion avoids memory allocationsMaxime Coste