我有一个字符串,我试图找出它是否是另一个单词的子字符串。
例如(伪代码)
say I have string "pp"
and I want to compare it (using strncmp) to
happy
apples
pizza
and if it finds a match it'll replace the "pp" with "xx"
changing the words to
haxxles
axxles
pizza
这可以使用 strncmp 吗?