asHash property

int get asHash

Returns a hash of this String in its simplest form.

Currently uses FNV-1a hash function.

Implementation

int get asHash {
  int result = 0x811c9dc5;

  for (var e in codeUnits) {
    result ^= e;
    result *= 0x01000193;
    result &= 0x7FFFFFFF;
  }

  return result;
}