How can I split a string into a list of substrings, where the delimiter to split by is a MATLAB object type?

For example:

```
>> splitByType('a1b2c3',type=integer)
['a','b','c']

```

or:

```
>> splitByType('a1b2c3',type=character)
['1','2','3']

```