D modules

Mike Parker aldacron at gmail.com
Sun Nov 14 01:24:39 UTC 2021


On Saturday, 13 November 2021 at 22:52:55 UTC, pascal111 wrote:
> When I'm searching for "toUpper" and "toLower" functions that 
> string type uses, I confused when I reached the module 
> "std.string". In the first section of its page 
> "https://dlang.org/phobos/std_string.html" I didn't found 
> functions I'm searching for, but when I pressed ctrl+f and 
> typed function names, I found 'em in another section of the 
> page, but I didn't understand if I have to add something to 
> module name "std.string" or not, and I don't know how modules 
> divided nor its sections way in D. I hope someone clarifies 
> this obscure point to me and how can I search correctly for 
> sought functions.

Those functions used to be in `std.string` a long time ago and 
are no more. As did some others. The section where you found them 
in the `std.string` docs is a table listing their current 
location in `std.uni` and links to their documentation. It also 
says this just above the table:

> The following functions are publicly imported:

This means if you are already importing `std.string`, you do not 
need to import `std.uni` for `toUpper` and `toLower`, as 
`std.string` publicly imports them, so they will be available for 
you to use. So you can use those functions by importing 
`std.string` or `std.uni`.

https://dlang.org/phobos/std_uni.html#.toLower
https://dlang.org/phobos/std_uni.html#.toUpper


More information about the Digitalmars-d-learn mailing list