reports/frontend/node_modules/es-toolkit/dist/compat/string/split.d.mts
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

37 lines
No EOL
1.1 KiB
TypeScript

//#region src/compat/string/split.d.ts
/**
* Splits the input string by the specified `separator`
* and returns a new array containing the split segments.
*
* @param [string=''] The string to split.
* @param [separator] The separator pattern to split by.
* @param [limit] The length to truncate results to.
* @returns Returns the string segments.
*
* @example
* split('a-b-c', '-');
* // => ['a', 'b', 'c']
*
* split('a-b-c', '-', 2);
* // => ['a', 'b']
*/
declare function split(string: string | null | undefined, separator?: RegExp | string, limit?: number): string[];
/**
* Splits the input string by the specified `separator`
* and returns a new array containing the split segments.
*
* @param [string=''] The string to split.
* @param [separator] The separator pattern to split by.
* @param [limit] The length to truncate results to.
* @returns Returns the string segments.
*
* @example
* split('a-b-c', '-');
* // => ['a', 'b', 'c']
*
* split('a-b-c', '-', 2);
* // => ['a', 'b']
*/
declare function split(string: string | null | undefined, index: string | number, guard: object): string[];
//#endregion
export { split };