How to code Z-Function of string?

Quantium qchessv2 at gmail.com
Thu Mar 26 19:34:08 UTC 2020


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' or not???
Is it a legit code or it doesn't work ?


More information about the Digitalmars-d-learn mailing list