View source code
Display the source code in rt/util/utf.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

rt.util.utf.stride - multiple declarations

Function stride

stride() returns the length of a UTF-8 sequence starting at index i in string s.

uint stride (
  const(char[]) s,
  ulong i
) pure nothrow @nogc @safe;

Returns

The number of bytes in the UTF-8 sequence or 0xFF meaning s[i] is not the start of of UTF-8 sequence.

Function stride

stride() returns the length of a UTF-16 sequence starting at index i in string s.

uint stride (
  const(wchar[]) s,
  ulong i
) pure nothrow @nogc @safe;

Function stride

stride() returns the length of a UTF-32 sequence starting at index i in string s.

uint stride (
  const(dchar[]) s,
  ulong i
) pure nothrow @nogc @safe;

Returns

The return value will always be 1.

Authors

Walter Bright, Sean Kelly

License

Boost License 1.0.