String2Level function rework

Added documentation.