summaryrefslogtreecommitdiff
path: root/src/string_utils.hh
AgeCommit message (Collapse)Author
2024-08-19Merge remote-tracking branch 'arrufat/includes-cleanup'Maxime Coste
2024-08-16include headers cleanupAdriĆ  Arrufat
2024-08-15Remove unused ConstexprVector and rename constexpr_utils.hh to array.hhMaxime Coste
2024-08-14Remove unused wrap_to and reduce string_utils headersMaxime Coste
2024-08-12Extract format implementation to its own fileMaxime Coste
Split it to avoid pulling all string_utils dependencies for just format.
2024-06-23Fix trailing whitespacesMaxime Coste
2023-10-25Remove redundant comparison operatorsMaxime Coste
Since C++20 (a != b) get automatically rewritten as !(a == b) if the != operator does not exist.
2022-08-20Add support for field width and digit grouping in formatMaxime Coste
2022-05-21Stop using deprecated std::iteratorJohannes Altmanninger
As reported in #4615 and others, GCC 12.1 emits deprecation warnings because we use std::iterator. Replace it with the modern equivalent. Closes #4615
2021-11-21More C++20 refactoringsMaxime Coste
Use CTAD instead of make functions, requires instead of enable_if
2021-11-21Replace std::enable_if with requiresMaxime Coste
Introduce some concepts for enum and flags handling, goodbye and thanks for all the fish std::enable_if.
2021-07-31Add a format_with format function that takes a FunctionRef appendMaxime Coste
2020-05-19Output debug memory stats in a nice tableMaxime Coste
2019-11-23Make wrap_lines a lazy range viewMaxime Coste
Avoid the need to allocate a vector by using the ranges framework.
2019-11-09Remove unused trim_whitespaces()Jason Felice
2019-10-17Remove explicit sizes from make_array callsMaxime Coste
2019-07-25src: De-indent docstrings passed to command/option/mapping definitionsFrank LENORMAND
This commit implements formatting behaviour when the first character of a docstring is a newline. In that case, the exact indentation level of the next line will be removed from that line and all subsequent non-empty lines. An error will be returned if a subsequent non-empty line does not have the same indentation level. The docstrings are always trimmed (surrounding whitespaces) whether the first character is a newline or not, as was the case prior to this commit. Example: the following declaration ``` define-command test -docstring %{ test: do something Nothing really. More indented lines. } nop ``` would be rendered as ``` test: do something Nothing really. More indented lines. ``` Related to #2405
2019-06-23Add support for `echo -quoting (raw|kakoune|shell)` switchMaxime Coste
2019-06-19Refactor option_to_string quoting support, introduce Quoting::RawMaxime Coste
2018-08-29Use shell specific quoting for env varsMaxime Coste
Add a test case to validate roundtrips between Kakoune and the shell.
2018-07-24Quote every option type but integral typesMaxime Coste
Opt-in quoting was a bad choice, lets default to opt-out with all integral types non quoted.
2018-07-22Opt-in types for quoting of option listsMaxime Coste
This avoid quoting ints in int-lists for example, as they do not risk containing whitespaces. Fixes #2223
2018-07-05Introduce a "double_up" function for doubling up escapingMaxime Coste
2018-07-05Make selection lists use the option list syntaxMaxime Coste
2018-05-27Refactor option_from_string to return directly the option valueMaxime Coste
2018-05-21Fix incompatible to_string function declaration when size_t is unsigned intMaxime Coste
2018-04-29Fix tests after changes to json_ui outputMaxime Coste
2018-04-27Add a debug regex command to dump regex instructionsMaxime Coste
2017-12-07Tweak unescape template function to unescape the escape char as wellMaxime Coste
Test that more thouroughly in the unit tests.
2017-12-06Remove Vector returning split functions, use range adaptorMaxime Coste
Do not allocate temporary vectors to store splitted data, use the 'split' range adaptor along with transform(unescape) to provide the same feature with less allocations.
2017-10-10Move all non-core string code to string_utils.{hh,cc}Maxime Coste