Some user-made C functions and their D equivalents

ryuukk_ ryuukk.dev at gmail.com
Wed Jul 27 19:07:26 UTC 2022


On Wednesday, 27 July 2022 at 18:19:34 UTC, pascal111 wrote:
> I made a library of some useful functions while I was studying 
> C, and I'm curious to know if D has equivalents or some ones 
> for some of my functions, or I have to retype 'em again in D.
>
> The library link:
> https://github.com/pascal111-fra/turbo-c-programs/blob/main/COLLECT2.H

D ships with libc so everything in there is available

```C
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
#include<math.h>
```


In d the equivalent imports:

```D
import core.stdc.stdio;
import core.stdc.string;
import core.stdc.stdlib;
import core.stdc.ctype;
import core.stdc.math;
```


More information about the Digitalmars-d-learn mailing list