std.utf.stride_back - multiple declarations
- Function strideBack
- Function strideBack
- Function strideBack
Function strideBack
returns the length of the UTF-8 sequence ending one code
unit before strideBack in index.
str
works with both UTF-8 strings and bidirectional ranges of
strideBackchar. If no index is passed, then a bidirectional range will work, but
if an index is passed, then a random-access range is required.
defaults to indexstr.length if none is passed.
Prototypes
uint strideBack(S)( S str, size_t index ) if (is(S : const(char[])) || isRandomAccessRange!S && is(Unqual!(ElementType!S) == char)); uint strideBack(S)( S str ) if (is(S : const(char[])) || isRandomAccessRange!S && hasLength!S && is(Unqual!(ElementType!S) == char));
Returns
The number of bytes in the UTF-8 sequence.
Throws
May throw a if UTFException is not one past the
end of a valid UTF-8 sequence.
str[index]
Notes
will not fully verify the validity of the UTF-8
sequence. It will, however, guarantee that
strideBack is a valid index - stride(str, index)index.
Function strideBack
returns the length of the UTF-16 sequence ending one code
unit before strideBack in index.
str
works with both UTF-16 strings and ranges of strideBackwchar. If
no index is passed, then a bidirectional range will work, but if an index is
passed, then a random-access range is required.
defaults to indexstr.length if none is passed.
Prototypes
uint strideBack(S)( S str, size_t index ) if (is(S : const(wchar[])) || isRandomAccessRange!S && is(Unqual!(ElementType!S) == wchar)); uint strideBack(S)( S str ) if (is(S : const(wchar[])) || isBidirectionalRange!S && is(Unqual!(ElementType!S) == wchar));
Returns
The number of bytes in the UTF-16 sequence.
Throws
May throw a if UTFException is not one past the
end of a valid UTF-16 sequence.
str[index]
Notes
will only analyze the element at stride
element. It will not fully verify the validity of UTF-16 sequence, nor
even verify the presence of the sequence: it will not actually
guarantee that str[index - 1].
stride(str, index) <= index
Function strideBack
returns the length of the UTF-32 sequence ending one code
unit before strideBack in index.
str
works with both UTF-32 strings and ranges of strideBackdchar. If
no index is passed, then a bidirectional range will work, but if an index is
passed, then a random-access range is required.
defaults to indexstr.length if none is passed.
Prototypes
uint strideBack(S)( S str, size_t index ) if (isRandomAccessRange!S && is(Unqual!(ElementEncodingType!S) == dchar)); uint strideBack(S)( S str ) if (isBidirectionalRange!S && is(Unqual!(ElementEncodingType!S) == dchar));
Returns
The number of bytes in the UTF-32 sequence (always 1).
Throws
Never.
Authors
Walter Bright and Jonathan M Davis