programming-language文字列変換.タブ→空白変換(Tabify,Expand)On this page変換.タブ→空白変換(Tabify,Expand) Python pystr.expandtabs(4) Bash shcat a.txt | expand -t 4 Ruby 拡張する rbclass String def expand_tabs(tabstop = 4) 1 while self.sub!(/\t+/) { ' ' * ($&.size * tabstop - $`.size % tabstop) } self endend 📩 ご意見・ご感想はこちらから