本文共 453 字,大约阅读时间需要 1 分钟。
如何查找公共子字符串长度
Use the strlen()
function provided by the standard library string.h
header file.
使用标准库string.h
头文件提供的strlen()
函数。
char name[7] = "Flavio";strlen(name);
This function will return the length of a string as an integer value.
该函数将字符串的长度作为整数值返回。
Working example:
工作示例:
#include#include int main(void) { char name[7] = "Flavio"; int length = strlen(name); printf("Name length: %u", length);}
翻译自:
如何查找公共子字符串长度
转载地址:http://doqgb.baihongyu.com/