GoScrobble/web/node_modules/lodash-es/_stringSize.js

19 lines
430 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
import asciiSize from './_asciiSize.js';
import hasUnicode from './_hasUnicode.js';
import unicodeSize from './_unicodeSize.js';
/**
* Gets the number of symbols in `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the string size.
*/
function stringSize(string) {
return hasUnicode(string)
? unicodeSize(string)
: asciiSize(string);
}
export default stringSize;