Suggestion: The best solution is to dynamically create an array of byte that has length equal to that of the string.
edn.embarcadero.com