Remove the last
nUnicode code points of a string.
var removeLastCodePoint = require( '@stdlib/string/base/remove-last-code-point' );Removes the last n Unicode code points of a string.
var out = removeLastCodePoint( 'last man standing', 1 );
// returns 'last man standin'
out = removeLastCodePoint( 'Hidden Treasures', 1 );
// returns 'Hidden Treasure'
out = removeLastCodePoint( 'foo bar', 5 );
// returns 'fo'
out = removeLastCodePoint( 'foo bar', 10 );
// returns ''var removeLastCodePoint = require( '@stdlib/string/base/remove-last-code-point' );
var str = removeLastCodePoint( 'presidential election', 1 );
// returns 'presidential electio'
str = removeLastCodePoint( 'JavaScript', 1 );
// returns 'JavaScrip'
str = removeLastCodePoint( 'The Last of the Mohicans', 5 );
// returns 'The Last of the Moh'
str = removeLastCodePoint( 'अनुच्छेद', 1 );
// returns 'अनुच्छे'@stdlib/string/base/remove-first-code-point: remove the first Unicode code point of a string.@stdlib/string/base/remove-last-grapheme-cluster: remove the last grapheme cluster (i.e., user-perceived character) of a string.@stdlib/string/base/remove-last: remove the last UTF-16 code unit of a string.