mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°7063 - Forms SDK - Add Symfony forms component
error forms issue
This commit is contained in:
27
node_modules/@orchidjs/unicode-variants/dist/esm/strings.js
generated
vendored
Normal file
27
node_modules/@orchidjs/unicode-variants/dist/esm/strings.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*! @orchidjs/unicode-variants | https://github.com/orchidjs/unicode-variants | Apache License (v2) */
|
||||
/**
|
||||
* Get all possible combinations of substrings that add up to the given string
|
||||
* https://stackoverflow.com/questions/30169587/find-all-the-combination-of-substrings-that-add-up-to-the-given-string
|
||||
* @param {string} input
|
||||
* @return {string[][]}
|
||||
*/
|
||||
const allSubstrings = input => {
|
||||
if (input.length === 1) return [[input]];
|
||||
/** @type {string[][]} */
|
||||
|
||||
let result = [];
|
||||
const start = input.substring(1);
|
||||
const suba = allSubstrings(start);
|
||||
suba.forEach(function (subresult) {
|
||||
let tmp = subresult.slice(0);
|
||||
tmp[0] = input.charAt(0) + tmp[0];
|
||||
result.push(tmp);
|
||||
tmp = subresult.slice(0);
|
||||
tmp.unshift(input.charAt(0));
|
||||
result.push(tmp);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
export { allSubstrings };
|
||||
//# sourceMappingURL=strings.js.map
|
||||
Reference in New Issue
Block a user