On 25/10/2022 5:17 PM, Siarhei Siamashka wrote:
Wow, I didn't expect anything like this and just thought that the
nightmares of handling 8-bit codepages for non-English languages ceased
to exist nowadays. Too bad. What are the best practices to deal with
Turkish text in D language?
std.uni do
On Thursday, 13 October 2022 at 08:27:17 UTC, bauss wrote:
```d
bool isearch(S1, S2)(S1 haystack, S2 needle)
{
import std.uni;
import std.algorithm;
return haystack.asLowerCase.canFind(needle.asLowerCase);
}
```
untested.
-Steve
This doesn't actually work properly in all languages
On 10/24/22 14:26, Per Nordlöw wrote:
What property of a container (type) `T` enables iteration as
```d
foreach (k, v; T.init)
{
...
}
```
? I thought it sufficed to define `T.byKeyValue` but its presence seem
to have no effect.
Another option is to use range functions where front() ret
On Mon, Oct 24, 2022 at 09:26:14PM +, Per Nordlöw via Digitalmars-d-learn
wrote:
> What property of a container (type) `T` enables iteration as
>
> ```d
> foreach (k, v; T.init)
> {
> ...
> }
> ```
>
> ? I thought it sufficed to define `T.byKeyValue` but its presence seem
> to have no ef
What property of a container (type) `T` enables iteration as
```d
foreach (k, v; T.init)
{
...
}
```
? I thought it sufficed to define `T.byKeyValue` but its presence
seem to have no effect.
From there down:
https://dlang.org/spec/statement.html#foreach_over_struct_and_classes
On Monday, 24 October 2022 at 19:28:34 UTC, Jack Stouffer wrote:
I use
```
pragma(inline, true)
function definition
```
all over my code. And by default, DMD inlines these functions
even in debug builds, which normally is great. I have a custom
dynamic array container and if the indexing oper
On Monday, 24 October 2022 at 19:28:34 UTC, Jack Stouffer wrote:
I use
```
pragma(inline, true)
function definition
```
all over my code. And by default, DMD inlines these functions
even in debug builds, which normally is great. I have a custom
dynamic array container and if the indexing oper
I use
```
pragma(inline, true)
function definition
```
all over my code. And by default, DMD inlines these functions
even in debug builds, which normally is great. I have a custom
dynamic array container and if the indexing operator overload
function wasn't inlined the debug build would have
On Monday, 24 October 2022 at 12:10:19 UTC, Nick Treleaven wrote:
On Sunday, 23 October 2022 at 20:12:46 UTC, Hipreme wrote:
For reducing a D Interface file dependency when generating it
with the `-H` flag for DMD, you can't import a module on the
top level.
Take a look at that example:
This
On Sunday, 23 October 2022 at 20:12:46 UTC, Hipreme wrote:
For reducing a D Interface file dependency when generating it
with the `-H` flag for DMD, you can't import a module on the
top level.
Take a look at that example:
This would make a nice blog post if you have one ;-)
On Tuesday, 4 October 2022 at 18:18:41 UTC, Ali Çehreli wrote:
A related topic is how the "end slice" never loses that
capacity:
void main() {
auto a = [ 1, 2 ];
auto b = a;
assert(a.capacity != 0);
assert(b.capacity != 0);
b.length--;
assert(b.capacity == 0);
asse
12 matches
Mail list logo