1 var trimmedEndIndex = require('./_trimmedEndIndex');
3 /** Used to match leading whitespace. */
4 var reTrimStart = /^\s+/;
7 * The base implementation of `_.trim`.
10 * @param {string} string The string to trim.
11 * @returns {string} Returns the trimmed string.
13 function baseTrim(string) {
15 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
19 module.exports = baseTrim;