String Comparison Operator

tcak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Apr 30 09:16:39 PDT 2017


On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote:
> Is there a String Comparison Operator in D?

You normally use double equation marks (==) to do that.

auto name = "Jack";
if( name == "Jack" ) writeln("Hi Jack!");


More information about the Digitalmars-d-learn mailing list