Bug 18813 – fromStringz should work with char, wchar and dchar

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2018-04-30T18:22:00Z
Last change time
2018-05-29T13:56:48Z
Assigned to
No Owner
Creator
Giles Bathgate

Comments

Comment #0 by giles.bathgate+dlang — 2018-04-30T18:22:00Z
The std.string.fromStringz function currently only works with zero-terminated strings of char. The following PR adds additional support for wchar and dchar: https://github.com/dlang/phobos/pull/6438 The existing char only API is left for backwards compatibility.
Comment #1 by github-bugzilla — 2018-05-29T13:56:47Z
Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/20efd72da7bc3a95b44e67807ad15b1ceb332114 fix Issue 18813 add wchar/dchar fromStringz template function This adds a wide string template functions to complement the existing fromStringz function.