summaryrefslogtreecommitdiffstats
path: root/Help/command/string.rst
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2018-02-11 10:04:26 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-02-11 10:04:26 (GMT)
commita71ab3be0e668731885740a11d29d378069d9677 (patch)
tree77eaa43588aedac136026cc56a61ddbaa9971b37 /Help/command/string.rst
parente24cda008e3ea1cbb22d17d29c5c39999facb4b7 (diff)
downloadCMake-a71ab3be0e668731885740a11d29d378069d9677.zip
CMake-a71ab3be0e668731885740a11d29d378069d9677.tar.gz
CMake-a71ab3be0e668731885740a11d29d378069d9677.tar.bz2
Help: Expand string(MAKE_C_IDENTIFIER) docs
The MAKE_C_IDENTIFIER subcommand was also buried in the docs for the TIMESTAMP subcommand, so it has been pulled out to its own subheading.
Diffstat (limited to 'Help/command/string.rst')
-rw-r--r--Help/command/string.rst19
1 files changed, 12 insertions, 7 deletions
diff --git a/Help/command/string.rst b/Help/command/string.rst
index fb3893f..d8da7be 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -282,6 +282,18 @@ CONFIGURE
Transform a string like :command:`configure_file` transforms a file.
+MAKE_C_IDENTIFIER
+"""""""""""""""""
+
+::
+
+ string(MAKE_C_IDENTIFIER <input string> <output variable>)
+
+Convert each non-alphanumeric character in the ``<input string>`` to an
+underscore and store the result in the ``<output variable>``. If the first
+character of the string is a digit, an underscore will also be prepended to
+the result.
+
RANDOM
""""""
@@ -346,13 +358,6 @@ If no explicit ``<format string>`` is given it will default to:
%Y-%m-%dT%H:%M:%S for local time.
%Y-%m-%dT%H:%M:%SZ for UTC.
-
-::
-
- string(MAKE_C_IDENTIFIER <input string> <output variable>)
-
-Write a string which can be used as an identifier in C.
-
.. note::
If the ``SOURCE_DATE_EPOCH`` environment variable is set,