BasicString.backCodeUnit

Returns the last character(utf8: char, utf16: wchar, utf32: dchar) of the BasicString.

This function shall not be called on empty strings.

  1. CharType backCodeUnit [@property getter]
    struct BasicString
    @property const scope pure nothrow @trusted @nogc
    backCodeUnit
    ()
  2. CharType backCodeUnit [@property setter]

Examples

{
	BasicString!char str = "123";

	assert(str.backCodeUnit == '3');
}

{
	BasicString!char str = "12á";

	immutable(char)[2] a = "á";
	assert(str.backCodeUnit == a[1]);
}

{
	BasicString!char str = "123";

	str.backCodeUnit = 'x';
	assert(str == "12x");
}

Meta