Re: How to code Z-Function of string?

2020-03-26 Thread MoonlightSentinel via Digitalmars-d-learn
On Thursday, 26 March 2020 at 19:34:08 UTC, Quantium wrote: string s="abc"; writeln(s[1]); // Should write 'b' or not??? Is it a legit code or it doesn't work ? Yes, but keep in mind that char[] implies UTF8. Hence this won't work if your input contains e.g. chinese characters.

How package Dlang in a standalone portable executable?

2020-03-26 Thread Marcone via Digitalmars-d-learn
I need package Dlang in a standalone portable executable. I need packcages all dependencies, dlls, files, etc in one executable file.

Re: How to code Z-Function of string?

2020-03-26 Thread Dennis via Digitalmars-d-learn
On Thursday, 26 March 2020 at 19:34:08 UTC, Quantium wrote: 1. How can I make string ONLY char[] (Not immutable) You can use .dup to make a mutable copy of an array. ``` char[] a = "abc".dup; ``` 2. How can I work with some of chars in the stirng, is, for example: string s="abc";

How to code Z-Function of string?

2020-03-26 Thread Quantium via Digitalmars-d-learn
I cannot make a code that is calculating Z-Function of string. Main trouble is that string is immutable char[]. 1. How can I make string ONLY char[] (Not immutable) 2. How can I work with some of chars in the stirng, is, for example: string s="abc"; writeln(s[1]); // Should write 'b'

Re: Where is the latest android dev info?

2020-03-26 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 26 March 2020 at 10:07:35 UTC, BetaDamnit wrote: Maybe you have some free time with nCoV? nope, it is even worse for my time right now. It seems rather straight forward, just use ldc2, ndk linker, and proper linking to android libs to use the functionality Yeah, that's

Re: linking obj files compiled with LDC2 1.20.0 on Win64

2020-03-26 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Sunday, 22 March 2020 at 18:43:50 UTC, realhet wrote: Hello, I'm try to use the latest LDC2 version: 1.20.0 Previously I used 1.6.0 [...] Try to run the compiler in visual studio command line terminal.

Re: Where is the latest android dev info?

2020-03-26 Thread BetaDamnit via Digitalmars-d-learn
On Monday, 23 March 2020 at 15:39:27 UTC, Adam D. Ruppe wrote: My thingy can help https://github.com/adamdruppe/d_android a lot is built into ldc now too which is really nice as well. i need to update my repo to use the new ldc features, hoping to tomorrow. i'm just behind on a lot of things