Replace tabs from the beggining of every line in the given source code with 4 (or given #) spaces

string:tabs_to_spaces(STRING $source_code, INT $num_spaces=4) : STRING

$str = "
    This
    \tThat
"
string:tabs_to_spaces($str)
#=> "\nThis\n    That\n"

Copyright ©2013-2022 SunSed®. All rights reserved.