Sha256: bc1276bddc3a7c3bea2b0e0144a3f92f5a1fee5d4ef906f569035f0f62eddaf5

Contents?: true

Size: 921 Bytes

Versions: 14

Compression:

Stored size: 921 Bytes

Contents

class String 
	@@didits = "0123456789" 
	@@hexdigits = "01234567890ABCDEF" 
	@@octdigits = "01234567" 
	@@uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
	@@lowercase = "abcdefghijklmnopqrstuvwxyz"
	@@letters = @@uppercase + @@lowercase 

	class << self

		# "0123456789"
		#
		# @return [String]
		def digits; @@digits end

		# "01234567890ABCDEF" 
		#
		# @return [String]
		def hexdigits; @@hexdigits end

		# "01234567" 
		#
		# @return [String]
		def octdigits; @@octdigits end

		# "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
		#
		# @return [String]
		def uppercase; @@uppercase end

		# "abcdefghijklmnopqrstuvwxyz"
		#
		# @return [String]
		def lowercase; @@lowercase end

		# "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
		#
		# @return [String]
		def letters; @@letters end
	end

	# return ascii code
	# @example
	#   'a'.ascii #=> 97
	def ascii() bytes.first end
end # class String

require_relative "string/pyformat"

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
tagen-1.1.7 lib/tagen/core/string.rb
tagen-1.1.6 lib/tagen/core/string.rb
tagen-1.1.5 lib/tagen/core/string.rb
tagen-1.1.4 lib/tagen/core/string.rb
tagen-1.1.3 lib/tagen/core/string.rb
tagen-1.1.2 lib/tagen/core/string.rb
tagen-1.1.1 lib/tagen/core/string.rb
tagen-1.1.0 lib/tagen/core/string.rb
tagen-1.0.4 lib/tagen/core/string.rb
tagen-1.0.3 lib/tagen/core/string.rb
tagen-1.0.2 lib/tagen/core/string.rb
tagen-1.0.1 lib/tagen/core/string.rb
tagen-1.0.0 lib/tagen/core/string.rb
tagen-0.2.5 lib/tagen/core/string.rb