Add split() to the C++ implementation.