core.stdc.stdlib - D Programming Language
Description: D Programming Language
Keywords: D programming language

Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.stdc.stdlib

D header file for C99.
This module contains bindings to selected types and functions from the standard C header <stdlib.h>. Note that this is not automatically generated, and may omit some types/functions from the original C header.
License:
Distributed under the Boost Software License 1.0. (See accompanying file LICENSE)
Authors:
Sean Kelly
Standards:
ISO/IEC 9899:1999 (E)

Source core/stdc/stdlib.d

alias `_compare_fp_t` = extern (C) int function(const(void*), const(void*));
nothrow @nogc inout(void)* `bsearch`(const void* `key`, inout(void)* `base`, size_t `nmemb`, size_t `size`, _compare_fp_t `compar`);
nothrow @nogc void `qsort`(void* `base`, size_t `nmemb`, size_t `size`, _compare_fp_t `compar`);
struct `div_t`;
struct `ldiv_t`;
struct `lldiv_t`;
enum int `EXIT_SUCCESS`;
enum int `EXIT_FAILURE`;
enum int `MB_CUR_MAX`;
enum int `RAND_MAX`;
nothrow @nogc double `atof`(scope const char* `nptr`);
nothrow @nogc int `atoi`(scope const char* `nptr`);
nothrow @nogc c_long `atol`(scope const char* `nptr`);
nothrow @nogc long `atoll`(scope const char* `nptr`);
nothrow @nogc double `strtod`(scope inout(char)* `nptr`, scope inout(char)** `endptr`);
nothrow @nogc float `strtof`(scope inout(char)* `nptr`, scope inout(char)** `endptr`);
nothrow @nogc c_long `strtol`(scope inout(char)* `nptr`, scope inout(char)** `endptr`, int `base`);
nothrow @nogc long `strtoll`(scope inout(char)* `nptr`, scope inout(char)** `endptr`, int `base`);
nothrow @nogc c_ulong `strtoul`(scope inout(char)* `nptr`, scope inout(char)** `endptr`, int `base`);
nothrow @nogc ulong `strtoull`(scope inout(char)* `nptr`, scope inout(char)** `endptr`, int `base`);
nothrow @nogc real `strtold`(scope inout(char)* `nptr`, scope inout(char)** `endptr`);
  Added to Bionic since Lollipop.
nothrow @nogc @trusted int `rand`();
  These two were added to Bionic in Lollipop.
nothrow @nogc @trusted void `srand`(uint `seed`);
nothrow @nogc void* `malloc`(size_t `size`);
nothrow @nogc void* `calloc`(size_t `nmemb`, size_t `size`);
nothrow @nogc void* `realloc`(void* `ptr`, size_t `size`);
nothrow @nogc void `free`(void* `ptr`);
nothrow @nogc void* `aligned_alloc`(size_t `alignment`, size_t `size`);
  since C11
nothrow @nogc @safe noreturn `abort`();
nothrow @nogc noreturn `exit`(int `status`);
nothrow @nogc int `atexit`(void function() `func`);
nothrow @nogc noreturn `_Exit`(int `status`);
nothrow @nogc char* `getenv`(scope const char* `name`);
nothrow @nogc int `system`(scope const char* `string`);
pure nothrow @nogc @trusted int `abs`(int `j`);
pure nothrow @nogc @trusted c_long `labs`(c_long `j`);
pure nothrow @nogc @trusted long `llabs`(long `j`);
nothrow @nogc @trusted div_t `div`(int `numer`, int `denom`);
nothrow @nogc @trusted ldiv_t `ldiv`(c_long `numer`, c_long `denom`);
nothrow @nogc @trusted lldiv_t `lldiv`(long `numer`, long `denom`);
nothrow @nogc int `mblen`(scope const char* `s`, size_t `n`);
nothrow @nogc int `mbtowc`(scope wchar_t* `pwc`, scope const char* `s`, size_t `n`);
nothrow @nogc int `wctomb`(scope char* `s`, wchar_t `wc`);
nothrow @nogc size_t `mbstowcs`(scope wchar_t* `pwcs`, scope const char* `s`, size_t `n`);
nothrow @nogc size_t `wcstombs`(scope char* `s`, scope const wchar_t* `pwcs`, size_t `n`);
pure nothrow @nogc void* `alloca`(size_t `size`);

Copyright © 1999-2023 by the D Language Foundation | Page generated by Ddoc on Sat Jul 15 12:03:19 2023