| 1 |
Ddoc |
| 2 |
|
| 3 |
$(P Phobos is the standard runtime library that comes with the D language |
| 4 |
compiler.) |
| 5 |
|
| 6 |
$(P Generally, the `std` namespace is used for the main modules in the |
| 7 |
Phobos standard library. The `etc` namespace is used for external C/C++ |
| 8 |
library bindings. The `core` namespace is used for low-level D runtime |
| 9 |
functions.) |
| 10 |
|
| 11 |
$(P The following table is a quick reference guide for which Phobos modules to |
| 12 |
use for a given category of functionality. Note that some modules may appear in |
| 13 |
more than one category, as some Phobos modules are quite generic and can be |
| 14 |
applied in a variety of situations.) |
| 15 |
|
| 16 |
$(BOOKTABLE , |
| 17 |
$(TR |
| 18 |
$(TH Modules) |
| 19 |
$(TH Description) |
| 20 |
) |
| 21 |
$(LEADINGROW Algorithms & ranges) |
| 22 |
$(TR |
| 23 |
$(TDNW |
| 24 |
$(MREF std,algorithm)$(BR) |
| 25 |
$(MREF std,range)$(BR) |
| 26 |
$(MREF std,range,primitives)$(BR) |
| 27 |
$(MREF std,range,interfaces)$(BR) |
| 28 |
) |
| 29 |
$(TD Generic algorithms that work with $(MREF_ALTTEXT ranges, std,range) |
| 30 |
of any type, including strings, arrays, and other kinds of |
| 31 |
sequentially-accessed data. Algorithms include searching, |
| 32 |
comparison, iteration, sorting, set operations, and mutation. |
| 33 |
) |
| 34 |
) |
| 35 |
$(LEADINGROW Array manipulation) |
| 36 |
$(TR |
| 37 |
$(TDNW |
| 38 |
$(MREF std,array)$(BR) |
| 39 |
$(MREF std,algorithm)$(BR) |
| 40 |
) |
| 41 |
$(TD Convenient operations commonly used with built-in arrays. |
| 42 |
Note that many common array operations are subsets of more generic |
| 43 |
algorithms that work with arbitrary ranges, so they are found in |
| 44 |
`std.algorithm`. |
| 45 |
) |
| 46 |
) |
| 47 |
$(LEADINGROW Containers) |
| 48 |
$(TR |
| 49 |
$(TDNW |
| 50 |
$(MREF std,container,array)$(BR) |
| 51 |
$(MREF std,container,binaryheap)$(BR) |
| 52 |
$(MREF std,container,dlist)$(BR) |
| 53 |
$(MREF std,container,rbtree)$(BR) |
| 54 |
$(MREF std,container,slist)$(BR) |
| 55 |
) |
| 56 |
$(TD See $(MREF_ALTTEXT std.container.*, std,container) for an |
| 57 |
overview. |
| 58 |
) |
| 59 |
) |
| 60 |
$(LEADINGROW Data formats) |
| 61 |
$(TR |
| 62 |
$(TDNW $(MREF std,base64)) |
| 63 |
$(TD Encoding / decoding Base64 format.) |
| 64 |
) |
| 65 |
$(TR |
| 66 |
$(TDNW $(MREF std,csv)) |
| 67 |
$(TD Read Comma Separated Values and its variants from an input range of $(CODE dchar).) |
| 68 |
) |
| 69 |
$(TR |
| 70 |
$(TDNW $(MREF std,json)) |
| 71 |
$(TD Read/write data in JSON format.) |
| 72 |
) |
| 73 |
$(TR |
| 74 |
$(TDNW $(MREF std,zip)) |
| 75 |
$(TD Read/write data in the ZIP archive format.) |
| 76 |
) |
| 77 |
$(TR |
| 78 |
$(TDNW $(MREF std,zlib)) |
| 79 |
$(TD Compress/decompress data using the zlib library.) |
| 80 |
) |
| 81 |
$(LEADINGROW Data integrity) |
| 82 |
$(TR |
| 83 |
$(TDNW $(MREF std,checkedint)) |
| 84 |
$(TD Checked integral types.) |
| 85 |
) |
| 86 |
$(TR |
| 87 |
$(TDNW $(MREF std,digest)) |
| 88 |
$(TD Compute digests such as md5, sha1 and crc32.) |
| 89 |
) |
| 90 |
$(TR |
| 91 |
$(TDNW $(MREF std,digest,crc)) |
| 92 |
$(TD Cyclic Redundancy Check (32-bit) implementation.) |
| 93 |
) |
| 94 |
$(TR |
| 95 |
$(TDNW $(MREF std,digest,hmac)) |
| 96 |
$(TD Compute HMAC digests of arbitrary data.) |
| 97 |
) |
| 98 |
$(TR |
| 99 |
$(TDNW $(MREF std,digest,md)) |
| 100 |
$(TD Compute MD5 hash of arbitrary data.) |
| 101 |
) |
| 102 |
$(TR |
| 103 |
$(TDNW $(MREF std,digest,murmurhash)) |
| 104 |
$(TD Compute MurmurHash of arbitrary data.) |
| 105 |
) |
| 106 |
$(TR |
| 107 |
$(TDNW $(MREF std,digest,ripemd)) |
| 108 |
$(TD Compute RIPEMD-160 hash of arbitrary data.) |
| 109 |
) |
| 110 |
$(TR |
| 111 |
$(TDNW $(MREF std,digest,sha)) |
| 112 |
$(TD Compute SHA1 and SHA2 hashes of arbitrary data.) |
| 113 |
) |
| 114 |
$(LEADINGROW Date & time) |
| 115 |
$(TR |
| 116 |
$(TDNW $(MREF std,datetime)) |
| 117 |
$(TD Provides convenient access to date and time representations.) |
| 118 |
) |
| 119 |
$(TR |
| 120 |
$(TDNW $(MREF core,time)) |
| 121 |
$(TD Implements low-level time primitives.) |
| 122 |
) |
| 123 |
$(LEADINGROW Exception handling) |
| 124 |
$(TR |
| 125 |
$(TDNW $(MREF std,exception)) |
| 126 |
$(TD Implements routines related to exceptions.) |
| 127 |
) |
| 128 |
$(TR |
| 129 |
$(TDNW $(MREF core,exception)) |
| 130 |
$(TD Defines built-in exception types and low-level |
| 131 |
language hooks required by the compiler.) |
| 132 |
) |
| 133 |
$(LEADINGROW External library bindings) |
| 134 |
$(TR |
| 135 |
$(TDNW $(MREF etc,c,curl)) |
| 136 |
$(TD Interface to libcurl C library.) |
| 137 |
) |
| 138 |
$(TR |
| 139 |
$(TDNW $(MREF etc,c,odbc,sql)) |
| 140 |
$(TD Interface to ODBC C library.) |
| 141 |
) |
| 142 |
$(TR |
| 143 |
$(TDNW $(MREF etc,c,odbc,sqlext)) |
| 144 |
) |
| 145 |
$(TR |
| 146 |
$(TDNW $(MREF etc,c,odbc,sqltypes)) |
| 147 |
) |
| 148 |
$(TR |
| 149 |
$(TDNW $(MREF etc,c,odbc,sqlucode)) |
| 150 |
) |
| 151 |
$(TR |
| 152 |
$(TDNW $(MREF etc,c,sqlite3)) |
| 153 |
$(TD Interface to SQLite C library.) |
| 154 |
) |
| 155 |
$(TR |
| 156 |
$(TDNW $(MREF etc,c,zlib)) |
| 157 |
$(TD Interface to zlib C library.) |
| 158 |
) |
| 159 |
$(LEADINGROW I/O & File system) |
| 160 |
$(TR |
| 161 |
$(TDNW $(MREF std,file)) |
| 162 |
$(TD Manipulate files and directories.) |
| 163 |
) |
| 164 |
$(TR |
| 165 |
$(TDNW $(MREF std,path)) |
| 166 |
$(TD Manipulate strings that represent filesystem paths.) |
| 167 |
) |
| 168 |
$(TR |
| 169 |
$(TDNW $(MREF std,stdio)) |
| 170 |
$(TD Perform buffered I/O.) |
| 171 |
) |
| 172 |
$(LEADINGROW Interoperability) |
| 173 |
$(TR |
| 174 |
$(TDNW |
| 175 |
$(MREF core,stdc,complex)$(BR) |
| 176 |
$(MREF core,stdc,ctype)$(BR) |
| 177 |
$(MREF core,stdc,errno)$(BR) |
| 178 |
$(MREF core,stdc,fenv)$(BR) |
| 179 |
$(MREF core,stdc,float_)$(BR) |
| 180 |
$(MREF core,stdc,inttypes)$(BR) |
| 181 |
$(MREF core,stdc,limits)$(BR) |
| 182 |
$(MREF core,stdc,locale)$(BR) |
| 183 |
$(MREF core,stdc,math)$(BR) |
| 184 |
$(MREF core,stdc,signal)$(BR) |
| 185 |
$(MREF core,stdc,stdarg)$(BR) |
| 186 |
$(MREF core,stdc,stddef)$(BR) |
| 187 |
$(MREF core,stdc,stdint)$(BR) |
| 188 |
$(MREF core,stdc,stdio)$(BR) |
| 189 |
$(MREF core,stdc,stdlib)$(BR) |
| 190 |
$(MREF core,stdc,string)$(BR) |
| 191 |
$(MREF core,stdc,tgmath)$(BR) |
| 192 |
$(MREF core,stdc,time)$(BR) |
| 193 |
$(MREF core,stdc,wchar_)$(BR) |
| 194 |
$(MREF core,stdc,wctype)$(BR) |
| 195 |
) |
| 196 |
$(TD |
| 197 |
D bindings for standard C headers.$(BR)$(BR) |
| 198 |
These are mostly undocumented, as documentation |
| 199 |
for the functions these declarations provide |
| 200 |
bindings to can be found on external resources. |
| 201 |
) |
| 202 |
) |
| 203 |
$(LEADINGROW Memory management) |
| 204 |
$(TR |
| 205 |
$(TDNW $(MREF core,memory)) |
| 206 |
$(TD Control the built-in garbage collector.) |
| 207 |
) |
| 208 |
$(TR |
| 209 |
$(TDNW $(MREF std,typecons)) |
| 210 |
$(TD Build scoped variables and reference-counted types.) |
| 211 |
) |
| 212 |
$(LEADINGROW Metaprogramming) |
| 213 |
$(TR |
| 214 |
$(TDNW $(MREF core,attribute)) |
| 215 |
$(TD Definitions of special attributes recognized by the compiler.) |
| 216 |
) |
| 217 |
$(TR |
| 218 |
$(TDNW $(MREF core,demangle)) |
| 219 |
$(TD Convert $(I mangled) D symbol identifiers to source representation.) |
| 220 |
) |
| 221 |
$(TR |
| 222 |
$(TDNW $(MREF std,demangle)) |
| 223 |
$(TD A simple wrapper around core.demangle.) |
| 224 |
) |
| 225 |
$(TR |
| 226 |
$(TDNW $(MREF std,meta)) |
| 227 |
$(TD Construct and manipulate template argument lists (aka type lists).) |
| 228 |
) |
| 229 |
$(TR |
| 230 |
$(TDNW $(MREF std,traits)) |
| 231 |
$(TD Extract information about types and symbols at compile time.) |
| 232 |
) |
| 233 |
$(TR |
| 234 |
$(TDNW $(MREF std,typecons)) |
| 235 |
$(TD Construct new, useful general purpose types.) |
| 236 |
) |
| 237 |
$(LEADINGROW Multitasking) |
| 238 |
$(TR |
| 239 |
$(TDNW $(MREF std,concurrency)) |
| 240 |
$(TD Low level messaging API for threads.) |
| 241 |
) |
| 242 |
$(TR |
| 243 |
$(TDNW $(MREF std,parallelism)) |
| 244 |
$(TD High level primitives for SMP parallelism.) |
| 245 |
) |
| 246 |
$(TR |
| 247 |
$(TDNW $(MREF std,process)) |
| 248 |
$(TD Starting and manipulating processes.) |
| 249 |
) |
| 250 |
$(TR |
| 251 |
$(TDNW $(MREF core,atomic)) |
| 252 |
$(TD Basic support for lock-free concurrent programming.) |
| 253 |
) |
| 254 |
$(TR |
| 255 |
$(TDNW $(MREF core,sync,barrier)) |
| 256 |
$(TD Synchronize the progress of a group of threads.) |
| 257 |
) |
| 258 |
$(TR |
| 259 |
$(TDNW $(MREF core,sync,condition)) |
| 260 |
$(TD Synchronized condition checking.) |
| 261 |
) |
| 262 |
$(TR |
| 263 |
$(TDNW $(MREF core,sync,exception)) |
| 264 |
$(TD Base class for synchronization exceptions.) |
| 265 |
) |
| 266 |
$(TR |
| 267 |
$(TDNW $(MREF core,sync,mutex)) |
| 268 |
$(TD Mutex for mutually exclusive access.) |
| 269 |
) |
| 270 |
$(TR |
| 271 |
$(TDNW $(MREF core,sync,rwmutex)) |
| 272 |
$(TD Shared read access and mutually exclusive write access.) |
| 273 |
) |
| 274 |
$(TR |
| 275 |
$(TDNW $(MREF core,sync,semaphore)) |
| 276 |
$(TD General use synchronization semaphore.) |
| 277 |
) |
| 278 |
$(TR |
| 279 |
$(TDNW $(MREF core,thread)) |
| 280 |
$(TD Thread creation and management.) |
| 281 |
) |
| 282 |
$(LEADINGROW Networking) |
| 283 |
$(TR |
| 284 |
$(TDNW $(MREF std,socket)) |
| 285 |
$(TD Socket primitives.) |
| 286 |
) |
| 287 |
$(TR |
| 288 |
$(TDNW $(MREF std,net,curl)) |
| 289 |
$(TD Networking client functionality as provided by libcurl.) |
| 290 |
) |
| 291 |
$(TR |
| 292 |
$(TDNW $(MREF std,net,isemail)) |
| 293 |
$(TD Validates an email address according to RFCs 5321, 5322 and others.) |
| 294 |
) |
| 295 |
$(TR |
| 296 |
$(TDNW $(MREF std,uri)) |
| 297 |
$(TD Encode and decode Uniform Resource Identifiers (URIs).) |
| 298 |
) |
| 299 |
$(TR |
| 300 |
$(TDNW $(MREF std,uuid)) |
| 301 |
$(TD Universally-unique identifiers for resources in distributed |
| 302 |
systems.) |
| 303 |
) |
| 304 |
$(LEADINGROW Numeric) |
| 305 |
$(TR |
| 306 |
$(TDNW $(MREF std,bigint)) |
| 307 |
$(TD An arbitrary-precision integer type.) |
| 308 |
) |
| 309 |
$(TR |
| 310 |
$(TDNW $(MREF std,complex)) |
| 311 |
$(TD A complex number type.) |
| 312 |
) |
| 313 |
$(TR |
| 314 |
$(TDNW $(MREF std,math)) |
| 315 |
$(TD Elementary mathematical functions (powers, roots, trigonometry).) |
| 316 |
) |
| 317 |
$(TR |
| 318 |
$(TDNW $(MREF std,mathspecial)) |
| 319 |
$(TD Families of transcendental functions.) |
| 320 |
) |
| 321 |
$(TR |
| 322 |
$(TDNW $(MREF std,numeric)) |
| 323 |
$(TD Floating point numerics functions.) |
| 324 |
) |
| 325 |
$(TR |
| 326 |
$(TDNW $(MREF std,random)) |
| 327 |
$(TD Pseudo-random number generators.) |
| 328 |
) |
| 329 |
$(TR |
| 330 |
$(TDNW $(MREF core,checkedint)) |
| 331 |
$(TD Range-checking integral arithmetic primitives.) |
| 332 |
) |
| 333 |
$(TR |
| 334 |
$(TDNW $(MREF core,math)) |
| 335 |
$(TD Built-in mathematical intrinsics.) |
| 336 |
) |
| 337 |
$(LEADINGROW Paradigms) |
| 338 |
$(TR |
| 339 |
$(TDNW $(MREF std,functional)) |
| 340 |
$(TD Functions that manipulate other functions.) |
| 341 |
) |
| 342 |
$(TR |
| 343 |
$(TDNW $(MREF std,algorithm)) |
| 344 |
$(TD Generic algorithms for processing sequences.) |
| 345 |
) |
| 346 |
$(TR |
| 347 |
$(TDNW $(MREF std,signals)) |
| 348 |
$(TD Signal-and-slots framework for event-driven programming.) |
| 349 |
) |
| 350 |
$(LEADINGROW Runtime utilities) |
| 351 |
$(TR |
| 352 |
$(TDNW $(MREF1 object)) |
| 353 |
$(TD Core language definitions. Automatically imported.) |
| 354 |
) |
| 355 |
$(TR |
| 356 |
$(TDNW $(MREF std,getopt)) |
| 357 |
$(TD Parsing of command-line arguments.) |
| 358 |
) |
| 359 |
$(TR |
| 360 |
$(TDNW $(MREF std,compiler)) |
| 361 |
$(TD Host compiler vendor string and language version.) |
| 362 |
) |
| 363 |
$(TR |
| 364 |
$(TDNW $(MREF std,system)) |
| 365 |
$(TD Runtime environment, such as OS type and endianness.) |
| 366 |
) |
| 367 |
$(TR |
| 368 |
$(TDNW $(MREF core,cpuid)) |
| 369 |
$(TD Capabilities of the CPU the program is running on.) |
| 370 |
) |
| 371 |
$(TR |
| 372 |
$(TDNW $(MREF core,memory)) |
| 373 |
$(TD Control the built-in garbage collector.) |
| 374 |
) |
| 375 |
$(TR |
| 376 |
$(TDNW $(MREF core,runtime)) |
| 377 |
$(TD Control and configure the D runtime.) |
| 378 |
) |
| 379 |
$(LEADINGROW String manipulation) |
| 380 |
$(TR |
| 381 |
$(TDNW $(MREF std,string)) |
| 382 |
$(TD Algorithms that work specifically with strings.) |
| 383 |
) |
| 384 |
$(TR |
| 385 |
$(TDNW $(MREF std,array)) |
| 386 |
$(TD Manipulate builtin arrays.) |
| 387 |
) |
| 388 |
$(TR |
| 389 |
$(TDNW $(MREF std,algorithm)) |
| 390 |
$(TD Generic algorithms for processing sequences.) |
| 391 |
) |
| 392 |
$(TR |
| 393 |
$(TDNW $(MREF std,uni)) |
| 394 |
$(TD Fundamental Unicode algorithms and data structures.) |
| 395 |
) |
| 396 |
$(TR |
| 397 |
$(TDNW $(MREF std,utf)) |
| 398 |
$(TD Encode and decode UTF-8, UTF-16 and UTF-32 strings.) |
| 399 |
) |
| 400 |
$(TR |
| 401 |
$(TDNW $(MREF std,format)) |
| 402 |
$(TD Format data into strings.) |
| 403 |
) |
| 404 |
$(TR |
| 405 |
$(TDNW $(MREF std,path)) |
| 406 |
$(TD Manipulate strings that represent filesystem paths.) |
| 407 |
) |
| 408 |
$(TR |
| 409 |
$(TDNW $(MREF std,regex)) |
| 410 |
$(TD Regular expressions.) |
| 411 |
) |
| 412 |
$(TR |
| 413 |
$(TDNW $(MREF std,ascii)) |
| 414 |
$(TD Routines specific to the ASCII subset of Unicode.) |
| 415 |
) |
| 416 |
$(TR |
| 417 |
$(TDNW $(MREF std,encoding)) |
| 418 |
$(TD Handle and transcode between various text encodings.) |
| 419 |
) |
| 420 |
$(TR |
| 421 |
$(TDNW $(MREF std,windows,charset)) |
| 422 |
$(TD Windows specific character set support.) |
| 423 |
) |
| 424 |
$(TR |
| 425 |
$(TDNW $(MREF std,outbuffer)) |
| 426 |
$(TD Serialize data to $(CODE ubyte) arrays.) |
| 427 |
) |
| 428 |
$(LEADINGROW Type manipulations) |
| 429 |
$(TR |
| 430 |
$(TDNW $(MREF std,conv)) |
| 431 |
$(TD Convert types from one type to another.) |
| 432 |
) |
| 433 |
$(TR |
| 434 |
$(TDNW $(MREF std,typecons)) |
| 435 |
$(TD Type constructors for scoped variables, ref counted types, etc.) |
| 436 |
) |
| 437 |
$(TR |
| 438 |
$(TDNW $(MREF std,bitmanip)) |
| 439 |
$(TD High level bit level manipulation, bit arrays, bit fields.) |
| 440 |
) |
| 441 |
$(TR |
| 442 |
$(TDNW $(MREF std,variant)) |
| 443 |
$(TD Dynamically-typed variable that can hold a value of any type.) |
| 444 |
) |
| 445 |
$(TR |
| 446 |
$(TDNW $(MREF core,bitop)) |
| 447 |
$(TD Low level bit manipulation.) |
| 448 |
) |
| 449 |
$(TR |
| 450 |
$(TDNW $(MREF std,sumtype)) |
| 451 |
$(TD Type-safe discriminated union.) |
| 452 |
) |
| 453 |
$(LEADINGROW Vector programming) |
| 454 |
$(TR |
| 455 |
$(TDNW $(MREF core,simd)) |
| 456 |
$(TD SIMD intrinsics) |
| 457 |
) |
| 458 |
$(LEADINGROW Logging) |
| 459 |
$(TR |
| 460 |
$(TDNW |
| 461 |
$(MREF std,logger)$(BR) |
| 462 |
$(MREF std,logger,core)$(BR) |
| 463 |
$(MREF std,logger,filelogger)$(BR) |
| 464 |
$(MREF std,logger,multilogger)$(BR) |
| 465 |
$(MREF std,logger,nulllogger)$(BR) |
| 466 |
) |
| 467 |
$(TD |
| 468 |
Logging. |
| 469 |
) |
| 470 |
) |
| 471 |
|
| 472 |
$(COMMENT |
| 473 |
$(LEADINGROW Undocumented modules (intentionally omitted).) |
| 474 |
$(TR |
| 475 |
$(TDNW |
| 476 |
$(MREF core,sync,config)$(BR) |
| 477 |
$(MREF std,container,util)$(BR) |
| 478 |
$(MREF std,regex,internal,backtracking)$(BR) |
| 479 |
$(MREF std,regex,internal,generator)$(BR) |
| 480 |
$(MREF std,regex,internal,ir)$(BR) |
| 481 |
$(MREF std,regex,internal,kickstart)$(BR) |
| 482 |
$(MREF std,regex,internal,parser)$(BR) |
| 483 |
$(MREF std,regex,internal,tests)$(BR) |
| 484 |
$(MREF std,regex,internal,thompson)$(BR) |
| 485 |
) |
| 486 |
$(TD |
| 487 |
Internal modules. |
| 488 |
) |
| 489 |
) |
| 490 |
$(TR |
| 491 |
$(TDNW |
| 492 |
$(MREF core,vararg)$(BR) |
| 493 |
$(MREF std,c,fenv)$(BR) |
| 494 |
$(MREF std,c,linux,linux)$(BR) |
| 495 |
$(MREF std,c,linux,socket)$(BR) |
| 496 |
$(MREF std,c,locale)$(BR) |
| 497 |
$(MREF std,c,math)$(BR) |
| 498 |
$(MREF std,c,process)$(BR) |
| 499 |
$(MREF std,c,stdarg)$(BR) |
| 500 |
$(MREF std,c,stddef)$(BR) |
| 501 |
$(MREF std,c,stdio)$(BR) |
| 502 |
$(MREF std,c,stdlib)$(BR) |
| 503 |
$(MREF std,c,string)$(BR) |
| 504 |
$(MREF std,c,time)$(BR) |
| 505 |
$(MREF std,c,wcharh)$(BR) |
| 506 |
$(MREF std,stdint)$(BR) |
| 507 |
) |
| 508 |
$(TDN |
| 509 |
Redirect modules. |
| 510 |
) |
| 511 |
) |
| 512 |
$(TR |
| 513 |
$(TDNW |
| 514 |
$(MREF std,mmfile)$(BR) |
| 515 |
$(MREF std,typetuple)$(BR) |
| 516 |
) |
| 517 |
$(TD |
| 518 |
Deprecated modules. |
| 519 |
) |
| 520 |
) |
| 521 |
) |
| 522 |
) |
| 523 |
|
| 524 |
Macros: |
| 525 |
TITLE=Phobos Runtime Library |
| 526 |
DDOC_BLANKLINE= |
| 527 |
_= |