Update common.c

Updating split function to resemble Java String.split