Monday, August 18, 2014

Splitting a String by Length or Position

Here is a simple method to split a string into a list of substrings based on length.  For example, given the string "12345678901", if we were to split by 2 we would expect a result like {"12", "34", "56", "78", "90", "1"}.

Here is the method and tests:

No comments:

Post a Comment