Open
Description
Proposal:
Add a splitAt
method to String
extensions. This method splits a string into two parts at the specified index.
API:
List<String> splitAt(int index);
Example:
final result = "hello".splitAt(2);
// result: ["he", "llo"]
// Example with destructuring
final [firstPart, secondPart] = "hello".splitAt(2);
// firstPart: "he"
// secondPart: "llo"
Metadata
Metadata
Assignees
Labels
No labels