helper: Add string_choices.h

Add the helper function str_enabled_disabled() to select between the two
strings 'enabled' and 'disabled' depending on a boolean value.

Additional functions for frequently used strings can be added in the future
if required.

Change-Id: I2d8ae96b141f87966836e6e4c3a2ed6d12b71fa5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9006
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink
2025-07-20 11:12:57 +00:00
committed by Antonio Borneo
parent 6872f7e406
commit caf7ffc7eb
2 changed files with 23 additions and 0 deletions
+1
View File
@@ -32,6 +32,7 @@ noinst_LTLIBRARIES += %D%/libhelper.la
%D%/crc32.h \
%D%/time_support.h \
%D%/replacements.h \
%D%/string_choices.h \
%D%/fileio.h \
%D%/system.h \
%D%/jep106.h \