added a C++ implementation of xImplode