Skip to content

Commit 86f00c9

Browse files
committed
[DOC] Update rb_strlen_lit
It is not "in bytes" for wide char literal.
1 parent f55d78e commit 86f00c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/ruby/internal/intern/string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,8 @@ rbimpl_exc_new_cstr(VALUE exc, const char *str)
16861686
* Length of a string literal.
16871687
*
16881688
* @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.
1689+
* @return An integer constant expression that represents the number of
1690+
* `str`'s elements, not including the terminating NUL character.
16911691
*/
16921692
#define rb_strlen_lit(str) ((sizeof(str "") / sizeof(str ""[0])) - 1)
16931693

0 commit comments

Comments
 (0)