Short answer: unicode Long answer is here: http://dlang.org/phobos/std_range.html#.hasLength , please pay attention to narrow string paragraph. (failed constraint is hasLength!char[]) int is >= dchar so no issues for int.