string: introduce REPEAT sub-command

This commit is contained in:
Alex Turbov
2019-04-06 17:53:58 +08:00
committed by Brad King
parent db6fdfdb05
commit 536cca60ea
12 changed files with 136 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ Synopsis
string(`SUBSTRING`_ <string> <begin> <length> <out-var>)
string(`STRIP`_ <string> <out-var>)
string(`GENEX_STRIP`_ <string> <out-var>)
string(`REPEAT`_ <string> <count> <out-var>)
`Comparison`_
string(`COMPARE`_ <op> <string1> <string2> <out-var>)
@@ -269,6 +270,14 @@ trailing spaces removed.
Strip any :manual:`generator expressions <cmake-generator-expressions(7)>`
from the ``input string`` and store the result in the ``output variable``.
.. _REPEAT:
.. code-block:: cmake
string(REPEAT <input string> <count> <output variable>)
Produce the output string as repetion of ``input string`` ``count`` times.
Comparison
^^^^^^^^^^