Bug 24357 – String spec needs updating

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-01-26T16:07:32Z
Last change time
2024-02-01T11:39:58Z
Keywords
pull
Assigned to
No Owner
Creator
Nick Treleaven

Comments

Comment #0 by nick — 2024-01-26T16:07:32Z
This section needs a general clean up, fixing typos and more links: https://dlang.org/spec/arrays.html#strings > char[] strings are in UTF-8 format. wchar[] strings are in UTF-16 format. dchar[] strings are in UTF-32 format. The above is a bit confusing as strings always have immutable elements. > Since strings, however, are not 0 terminated in D This should be moved to the zero-terminated literals section. char* p = &str[3]; // pointer to 4th element char* p = str; // pointer to 1st element The second declaration no longer compiles. PR incoming.
Comment #1 by dlang-bot — 2024-01-26T16:11:26Z
@ntrel created dlang/dlang.org pull request #3761 " [spec/arrays] Improve string docs" fixing this issue: - Fix Bugzilla Issue 24357 - String spec needs updating https://github.com/dlang/dlang.org/pull/3761
Comment #2 by dlang-bot — 2024-02-01T11:39:58Z
dlang/dlang.org pull request #3761 " [spec/arrays] Improve string docs" was merged into master: - 15df017658c9f0293ea863172a40291d2cb014d8 by Nick Treleaven: Fix Bugzilla Issue 24357 - String spec needs updating https://github.com/dlang/dlang.org/pull/3761