Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cpp/string-and-character-literals-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ const size_t byteSize = (wcslen(str) + 1) * sizeof(wchar_t);

Notice that `strlen()` and `wcslen()` don't include the size of the terminating null character, whose size is equal to the element size of the string type: one byte on a `char*` or `char8_t*` string, two bytes on `wchar_t*` or `char16_t*` strings, and four bytes on `char32_t*` strings.

The maximum length of a string literal is 65,535 bytes. This limit applies to both narrow string literals and wide string literals.
In versions of Visual Studio before Visual Studio 2022 version 17.0, the maximum length of a string literal is 65,535 bytes. This limit applies to both narrow string literals and wide string literals. In Visual Studio 2022 version 17.0 and later, this restriction is lifted and string length is limited by available resources.

### Modifying string literals

Expand Down