summaryrefslogtreecommitdiffstats
path: root/Source/cmStringAlgorithms.h
Commit message (Collapse)AuthorAgeFilesLines
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-33/+0
|
* cmList class: various enhancementsMarc Chevrier2023-04-291-3/+3
|
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-29/+0
|
* cmExpandList and cmExpandLists rely on cmList classMarc Chevrier2023-04-231-8/+13
|
* cmStrCat(): allow any argument to be an rvalue stringKyle Edwards2022-12-061-36/+31
| | | | | This will allow us to re-use any rvalue allocation that is available, not just from the first argument.
* cmStrCat(): optimize when first argument is an rvalue stringKyle Edwards2022-11-301-7/+36
|
* cmStringAlgorithms: Add functions to parse strings to long long integersBrad King2022-09-201-0/+10
|
* Move helpers functions from cmStringAlgorithms.h to cmValue.hMarc Chevrier2021-09-211-78/+0
| | | | | Helpers functions related to cmValue semantic are now part of cmValue.h header.
* cmValue: add IsInternallyOn methodsMarc Chevrier2021-09-211-9/+6
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-18/+18
|
* cmProp: cm::string_view cast operator must be explicitMarc Chevrier2021-09-141-2/+24
| | | | | | | To avoid ambiguity on std::string assigment between the following two cmProp cast operators: * operator const std::string&() const noexcept * operator cm::string_view() const noexcept
* Refactor: cmHasPrefix and cmHasSuffix accept now cmPropMarc Chevrier2021-08-191-0/+21
|
* cmProp: refactoring: transform alias in classMarc Chevrier2021-08-081-23/+41
| | | | | | To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
* Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-4/+4
| | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* Merge topic 'cmstrlen'Kyle Edwards2020-09-091-0/+7
|\ | | | | | | | | | | | | 0c9cdf30ed cmStringAlgorithms: Add cmStrLen() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5201
| * cmStringAlgorithms: Add cmStrLen()Kyle Edwards2020-09-081-0/+7
| |
* | Merge topic 'optimize-cmJoin'Brad King2020-09-081-0/+11
|\ \ | |/ |/| | | | | | | | | 38928ee3ee cmStringAlgorithms: Add faster cmJoin overloads for strings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5185
| * cmStringAlgorithms: Add faster cmJoin overloads for stringsOleksandr Koval2020-09-031-0/+11
| | | | | | | | | | | | | | cmJoin() is often used with std::string ranges. Generic implementation uses std::ostringstream which is not optimal. With strings we can avoid operator<<() and make much faster implementation. Additional 'initial' argument is useful for cmStringCommand.cxx:HandleAppendCommand().
* | Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
|/ | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* Merge topic 'cmnonempty'Kyle Edwards2020-07-151-0/+14
|\ | | | | | | | | | | | | eaad8072ee cmNonempty: Convenience inlines to check for non-empty string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5017
| * cmNonempty: Convenience inlines to check for non-empty stringVitaly Stakhovsky2020-07-141-0/+14
| |
* | cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-8/+10
|/
* Genex: Add generator expressions $<DEVICE_LINK> and $<HOST_LINK>Marc Chevrier2020-04-191-1/+1
| | | | | | These generator expressions can only be used in link options properties. These expressions return the arguments respectively for device and host link step, otherwise return an empty string.
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-4/+4
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+3
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* cmStringAlgorithms: Add cmIsInternallyOn, cmIsNOTFOUND, cmIsOn, cmIsOffSebastian Holtermann2019-08-171-0/+45
| | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmIsInternallyOn` - `cmIsNOTFOUND` - `cmIsOn` - `cmIsOff` The implementations were copied from the equivalent functions in cmSystemTools.
* Merge topic 'cmExpandList'Kyle Edwards2019-08-161-0/+42
|\ | | | | | | | | | | | | | | | | 2f6495e24e cmSystemTools: Remove ExpandListArgument methods f4f3c68926 Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgument ff42dec891 cmStringAlgorithms: Add cmExpandList functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3682
| * cmStringAlgorithms: Add cmExpandList functionsSebastian Holtermann2019-08-141-0/+42
| |
* | Merge topic 'cmStringAlgorithms_ulong'Kyle Edwards2019-08-161-0/+9
|\ \ | |/ |/| | | | | | | | | 935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3681
| * cmStringAlgorithms: Add cmStrToLong and cmStrToULongSebastian Holtermann2019-08-101-0/+9
| | | | | | | | | | | | | | | | This adds the following functions to cmStringAlgorithms: - `cmStrToLong`: moved from `cmSystemTools::StringToLong` - `cmStrToULong`: moved from `cmSystemTools::StringToULong` Overloads of the given functions for `std::string` are added as well.
* | cmStringAlgorithms: Add cmRemoveQuotesSebastian Holtermann2019-08-091-0/+3
|/ | | | | - Add `cmRemoveQuotes` function to cmStringAlgorithms - Remove unused removeQuotes inline functions
* cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenizeSebastian Holtermann2019-08-051-0/+16
| | | | | | | | | | This adds the following functions to `cmStringAlgorithms`: - `cmIsSpace` - `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`) - `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`) - `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to accept `cm::string_view`)
* cmStringAlgorithms: Modernize cmWrap using cm::string_viewSebastian Holtermann2019-08-011-7/+11
|
* cmStringAlgorithms: Add cmCatViews and cmStrCat functionsSebastian Holtermann2019-08-011-0/+50
|
* cmStringAlgorithms: Simplify cmJoin using cm::string_viewSebastian Holtermann2019-08-011-19/+10
|
* cmStringAlgorithms: Simplify cmStrCmp using cm::string_viewSebastian Holtermann2019-08-011-21/+14
|
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+139
This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.