You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 destructuringfinal [firstPart, secondPart] ="hello".splitAt(2);
// firstPart: "he"// secondPart: "llo"
The text was updated successfully, but these errors were encountered:
Proposal:
Add a
splitAt
method toString
extensions. This method splits a string into two parts at the specified index.API:
Example:
The text was updated successfully, but these errors were encountered: