Spdk/lib/util
Shuhei Matsumoto d6e57b5389 util: Add spdk_strcpy_replace() to replace substrings
spdk_nvme_cpl_get_status_string() returns a string which contains upper
cases, spaces, and hyphens. To use the returned string for JSON RPC, we
have to convert it to a string which contains only lowercases and
underscores.

For our convenience, add a new API spdk_strcpy_replace() to replace
all occurrences of the search string with the replacement string.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I3ca9774d0bfb2d0bb7bd7412bc671e6f69104b7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16054
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-10 13:12:05 +00:00
..
base64_neon.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
base64_sve.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
base64.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bit_array.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
cpuset.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc16.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32_ieee.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32c.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
dif.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
fd_group.c util: add function spdk_fd_group_get_epoll_event 2022-11-22 10:01:43 +00:00
fd.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
file.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
hexlify.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
iov.c util: add spdk_iovmove() 2023-01-09 12:37:37 +00:00
Makefile lib/util: add strarray utility functions 2022-11-15 08:31:02 +00:00
math.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pipe.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_util.map util: Add spdk_strcpy_replace() to replace substrings 2023-01-10 13:12:05 +00:00
strerror_tls.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
string.c util: Add spdk_strcpy_replace() to replace substrings 2023-01-10 13:12:05 +00:00
util_internal.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
uuid.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
xor.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
zipf.c update Intel copyright notices 2022-11-10 08:28:53 +00:00