Sha256: 26942a3168ec1d82f5dede60bb5f7da7ee96f2a5721e3e762288fc8a90dcae41
Contents?: true
Size: 290 Bytes
Versions: 7
Compression:
Stored size: 290 Bytes
Contents
# $Id: textutils.rb 2192 2005-11-13 11:55:42Z aamine $ require 'nkf' module ReVIEW module TextUtils def detab(str, ts = 8) add = 0 len = nil str.gsub(/\t/) { len = ts - ($`.size + add) % ts add += len - 1 ' ' * len } end end end
Version data entries
7 entries across 7 versions & 1 rubygems