make UString::getRandomString safer