简体   繁体   English

strcspn 中的“c”代表什么?

[英]What does the “c” in strcspn stand for?

strspn("string", "chars") gives the length of the initial span in string consisting of characters in "chars", while strcspn("string", "chars") gives the length of the initial span in string consisting of characters not in "chars". strspn("string", "chars")给出由 "chars" 中的字符组成的字符串中初始跨度的长度,而strcspn("string", "chars")给出由字符组成的字符串中初始跨度的长度不在“字符”中。

What stands the "c" for? “c”代表什么?

What does the “c” in strcspn stand for? strcspn 中的“c”代表什么?

For the word "complementary".对于“互补”这个词。

From cppreference strcspn :cppreference strcspn

The function name stands for "complementary span" because the function searches for characters not found in src, that is the complement of src.函数名代表“complementary span”,因为该函数搜索src 中没有的字符,即src 的补码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM