Long.toOctalString

Returns a string representation of the {@code long} argument as an unsigned integer in base 8.

<p>The unsigned {@code long} value is the argument plus 2<sup>64</sup> if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in octal (base&nbsp;8) with no extra leading {@code 0}s.

<p>The value of the argument can be recovered from the returned string {@code s} by calling {@link Long#parseUnsignedLong(string, int) Long.parseUnsignedLong(s, 8)}.

<p>If the unsigned magnitude is zero, it is represented by a single zero character {@code '0'} ({@code '\u005Cu0030'}); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The following characters are used as octal digits:

<blockquote> {@code 01234567} </blockquote>

These are the characters {@code '\u005Cu0030'} through {@code '\u005Cu0037'}.

@param i a {@code long} to be converted to a string. @return the string representation of the unsigned {@code long} value represented by the argument in octal (base&nbsp;8). @see #parseUnsignedLong(string, int) @see #toUnsignedString(long, int)

class Long
static
string
toOctalString
(
long i
)

Meta