Rory Mcguire wrote: > Are all string literals that have the same value initialized to the same > address? > > void main() { > string same() { > return "This"; > } > assert("This" is same()); > assert("This" is "This"); > } > > > Can this be relied upon?
Interesting thanks guys. Was just curious about the speed of comparisons for string literals. Because I believe the string comparisons check if a string "is" another string first.