
D front-end changes: - Import latest fixes from dmd v2.107.0-beta.1. - Hex strings can now be cast to integer arrays. - Add support for Interpolated Expression Sequences. D runtime changes: - Import latest fixes from druntime v2.107.0-beta.1. - New core.interpolation module to provide run-time support for D interpolated expression sequence literals. Phobos changes: - Import latest fixes from phobos v2.107.0-beta.1. - `std.range.primitives.isBidirectionalRange', and `std.range.primitives.isRandomAccessRange' now take an optional element type. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd e770945277. * Make-lang.in (D_FRONTEND_OBJS): Add d/basicmangle.o, d/enumsem.o, d/funcsem.o, d/templatesem.o. * d-builtins.cc (build_frontend_type): Update for new front-end interface. * d-codegen.cc (declaration_type): Likewise. (parameter_type): Likewise. * d-incpath.cc (add_globalpaths): Likewise. (add_filepaths): Likewise. (add_import_paths): Likewise. * d-lang.cc (d_init_options): Likewise. (d_handle_option): Likewise. (d_parse_file): Likewise. * decl.cc (DeclVisitor::finish_vtable): Likewise. (DeclVisitor::visit (FuncDeclaration *)): Likewise. (get_symbol_decl): Likewise. * expr.cc (ExprVisitor::visit (StringExp *)): Likewise. Implement support for 8-byte hexadecimal strings. * typeinfo.cc (create_tinfo_types): Update internal TypeInfo representation. (TypeInfoVisitor::visit (TypeInfoConstDeclaration *)): Update for new front-end interface. (TypeInfoVisitor::visit (TypeInfoInvariantDeclaration *)): Likewise. (TypeInfoVisitor::visit (TypeInfoSharedDeclaration *)): Likewise. (TypeInfoVisitor::visit (TypeInfoWildDeclaration *)): Likewise. (TypeInfoVisitor::visit (TypeInfoClassDeclaration *)): Move data for TypeInfo_Class.nameSig to the end of the object. (create_typeinfo): Update for new front-end interface. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e770945277. * libdruntime/Makefile.am (DRUNTIME_SOURCES): Add core/interpolation.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 6d6e0b9b9.
49 lines
1.8 KiB
D
49 lines
1.8 KiB
D
/**
|
|
* D header file for POSIX's <string.h>.
|
|
*
|
|
* Note:
|
|
* - The <string.h> header shall define NULL and size_t as described in <stddef.h>.
|
|
* However, D has builtin `null` and `size_t` is defined in `object`.
|
|
*
|
|
* See_Also: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html
|
|
* Copyright: D Language Foundation, 2019
|
|
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
|
|
* Authors: Mathias 'Geod24' Lang
|
|
* Standards: The Open Group Base Specifications Issue 7, 2018 edition
|
|
* Source: $(DRUNTIMESRC core/sys/posix/_string.d)
|
|
*/
|
|
module core.sys.posix.string;
|
|
|
|
version (Posix):
|
|
extern(C):
|
|
nothrow:
|
|
@nogc:
|
|
|
|
/// Exposes `locale_t` as defined in `core.sys.posix.locale` (`<locale.h>`)
|
|
public import core.sys.posix.locale : locale_t;
|
|
|
|
/**
|
|
* Exposes the C99 functions
|
|
*
|
|
* C extensions and XSI extensions are missing
|
|
*/
|
|
public import core.stdc.string;
|
|
|
|
/// Copy string until character found
|
|
void* memccpy(return scope void* dst, scope const void* src, int c, size_t n) pure;
|
|
/// Copy string (including terminating '\0')
|
|
char* stpcpy(return scope char* dst, scope const char* src) pure;
|
|
/// Ditto
|
|
char* stpncpy(return scope char* dst, const char* src, size_t len) pure;
|
|
/// Compare strings according to current collation
|
|
int strcoll_l(scope const char* s1, scope const char* s2, locale_t locale);
|
|
///
|
|
char* strerror_l(int, locale_t);
|
|
/// Find length of string up to `maxlen`
|
|
size_t strnlen(scope const char* str, size_t maxlen) pure;
|
|
/// System signal messages
|
|
const(char)* strsignal(int);
|
|
/// Isolate sequential tokens in a null-terminated string
|
|
char* strtok_r(return scope char* str, scope const char* sep, char** context) pure;
|
|
/// Transform a string under locale
|
|
size_t strxfrm_l(char* s1, scope const char* s2, size_t n, locale_t locale);
|