Returns a substring of the string starting from the right.
strRight() extracts the number of characters from right of the string up to the count. In particular:
strRight()
count
value.length', strRight() returns a new string with the
value.length
Any argument value that is NaN is treated as if it were 0.
The string value to return the substring from.
The number of characters to extract
The substring based on the count number of characters from the right
0.4.2
strRight("Nevware21", -1); // ""strRight("Nevware21", 0); // ""strRight("Nevware21", 1); // "1"strRight("Nevware21", 3); // "e21"strRight("Nevware21", 21); // "Nevware21" Copy
strRight("Nevware21", -1); // ""strRight("Nevware21", 0); // ""strRight("Nevware21", 1); // "1"strRight("Nevware21", 3); // "e21"strRight("Nevware21", 21); // "Nevware21"
Returns a substring of the string starting from the right.
strRight()
extracts the number of characters from right of the string up to the count. In particular:count
is less than zero, strRight() returns an empty string.count
is less thanvalue.length', strRight() returns a new string with the
count` number of characters from the right of the string.count
is greater thanvalue.length
, then the value original value is returned.Any argument value that is NaN is treated as if it were 0.