We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rb_strlen_lit
1 parent f55d78e commit 86f00c9Copy full SHA for 86f00c9
include/ruby/internal/intern/string.h
@@ -1686,8 +1686,8 @@ rbimpl_exc_new_cstr(VALUE exc, const char *str)
1686
* Length of a string literal.
1687
*
1688
* @param[in] str A C String literal.
1689
- * @return An integer constant expression that represents `str`'s length,
1690
- * in bytes, not including the terminating NUL character.
+ * @return An integer constant expression that represents the number of
+ * `str`'s elements, not including the terminating NUL character.
1691
*/
1692
#define rb_strlen_lit(str) ((sizeof(str "") / sizeof(str ""[0])) - 1)
1693
0 commit comments