Spdk/test/unit/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.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 misc: Fix spelling mistakes 2022-12-09 08:16:18 +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
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
iov.c test/unit: fix memory overlap on test case 2022-12-05 09:56:54 +00:00
math.c util: Add spdk_memset_s 2023-01-09 12:43:35 +00:00
pipe.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
xor.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00