Sha256: 97b2474e5290c24133f8c16aefe032fd4cbf9893b5ae3ac9d7179bebeb19c76c

Contents?: true

Size: 242 Bytes

Versions: 2

Compression:

Stored size: 242 Bytes

Contents

# -*- coding: utf-8 -*-

module OrgParse

  module Utils
    # とりあえず
    def get_indent(str)
      return 0 if str.empty?
      str =~ /^(\s*)/
      $1.gsub(/([^\t]{8})|([^\t]*)\t/n){ [$+].pack("A8") }.size
    end
  end

end
    

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
org-parse-0.1.2 lib/org-parse/utils.rb
org-parse-0.1.1 lib/org-parse/utils.rb