Having "in" for arrays
lobo
swamplobo at gmail.com
Wed Nov 22 10:32:48 UTC 2017
On Wednesday, 22 November 2017 at 09:36:43 UTC, Dukc wrote:
> On Wednesday, 22 November 2017 at 08:03:50 UTC, Fra Mecca wrote:
>> void main()
>> {
>> auto v = ["r", "i", "o"];
>> assert ("r" in v);
>> }
>
> Also note that even if it wereimplemented, you search for 'r'
> instead of "r". "r" is a string, but you would want to search
> for a char.
Isn't 'v' an array of strings? If it were a array of chars, then
the search would be 'r'.
bye,
lobo
More information about the Digitalmars-d-learn
mailing list