I think this can be merged into splitString() by adding an optional parameter "limit", which is the max number of splits.