aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/trimmedRightIndex.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/trimmedRightIndex.js')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/trimmedRightIndex.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/trimmedRightIndex.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/trimmedRightIndex.js
new file mode 100644
index 00000000..71b9e38a
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/lodash/internal/trimmedRightIndex.js
@@ -0,0 +1,18 @@
+var isSpace = require('./isSpace');
+
+/**
+ * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace
+ * character of `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the index of the last non-whitespace character.
+ */
+function trimmedRightIndex(string) {
+ var index = string.length;
+
+ while (index-- && isSpace(string.charCodeAt(index))) {}
+ return index;
+}
+
+module.exports = trimmedRightIndex;