Class: String

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/laser/standard_library/string.rb,
lib/laser/standard_library/class_definitions.rb

Instance Method Summary collapse

Methods included from Comparable

#<, #<=, #>, #>=, #between?, compare_int

Instance Method Details

#%(format) ⇒ Object

pure: true builtin: true returns: String=



6
7
# File 'lib/laser/standard_library/string.rb', line 6

def %(format)
end

#*(integer) ⇒ Object

pure: true builtin: true returns: String= integer: Fixnum= | Bignum= | Float= raises: never



13
14
# File 'lib/laser/standard_library/string.rb', line 13

def *(integer)
end

#+(other_str) ⇒ Object

pure: true builtin: true returns: String= other_str: String= raises: never



20
21
# File 'lib/laser/standard_library/string.rb', line 20

def +(other_str)
end

#<<(int_or_obj) ⇒ Object

pure: true builtin: true returns: String= int_or_obj: Fixnum= | Bignum= | String= raises: never



27
28
# File 'lib/laser/standard_library/string.rb', line 27

def <<(int_or_obj)
end

#<=>(other_str) ⇒ Object

pure: true builtin: true returns: NilClass | Fixnum= raises: never



33
34
# File 'lib/laser/standard_library/string.rb', line 33

def <=>(other_str)
end

#==(other_str) ⇒ Object

pure: true builtin: true returns: Boolean raises: never



39
40
# File 'lib/laser/standard_library/string.rb', line 39

def ==(other_str)
end

#===(other_str) ⇒ Object

pure: true builtin: true returns: Boolean raises: never



45
46
# File 'lib/laser/standard_library/string.rb', line 45

def ===(other_str)
end

#=~(obj_or_reg) ⇒ Object

pure: true builtin: true



49
50
# File 'lib/laser/standard_library/string.rb', line 49

def =~(obj_or_reg)
end

#[](*args) ⇒ Object

pure: true builtin: true returns: String=



54
55
# File 'lib/laser/standard_library/string.rb', line 54

def [](*args)
end

#[]=(*args, val) ⇒ Object

pure: true builtin: true returns: String=



59
60
# File 'lib/laser/standard_library/string.rb', line 59

def []=(*args, val)
end

#ascii_only?Boolean

pure: true builtin: true returns: Boolean raises: never

Returns:

  • (Boolean)


65
66
# File 'lib/laser/standard_library/string.rb', line 65

def ascii_only?
end

#bytesObject Also known as: each_byte

pure: true builtin: true yield_usage: optional raises: never



71
72
# File 'lib/laser/standard_library/string.rb', line 71

def bytes
end

#bytesizeObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



77
78
# File 'lib/laser/standard_library/string.rb', line 77

def bytesize
end

#capitalizeObject

pure: true builtin: true returns: String= raises: never



83
84
# File 'lib/laser/standard_library/string.rb', line 83

def capitalize
end

#capitalize!Object

pure: true builtin: true returns: NilClass | String= raises: never



89
90
# File 'lib/laser/standard_library/string.rb', line 89

def capitalize!
end

#casecmp(other_str) ⇒ Object

pure: true builtin: true overload: String= -> Fixnum= overload: BasicObject -> NilClass raises: never



96
97
# File 'lib/laser/standard_library/string.rb', line 96

def casecmp(other_str)
end

#center(integer, padstr = ' ') ⇒ Object

pure: true builtin: true returns: String= integer: Fixnum= | Bignum= | Float= raises: never



103
104
# File 'lib/laser/standard_library/string.rb', line 103

def center(integer, padstr=' ')
end

#charsObject Also known as: each_char

pure: true builtin: true returns: String= yield_usage: optional raises: never



110
111
# File 'lib/laser/standard_library/string.rb', line 110

def chars
end

#chomp(separator = $/) ⇒ Object

pure: true builtin: true returns: String= separator: String= raises: never



117
118
# File 'lib/laser/standard_library/string.rb', line 117

def chomp(separator=$/)
end

#chomp!(separator = $/) ⇒ Object

pure: true builtin: true separator: String= returns: String= | NilCLass raises: never



124
125
# File 'lib/laser/standard_library/string.rb', line 124

def chomp!(separator=$/)
end

#chopObject

pure: true builtin: true returns: String= raises: never



130
131
# File 'lib/laser/standard_library/string.rb', line 130

def chop
end

#chop!Object

pure: true builtin: true raises: never



135
136
# File 'lib/laser/standard_library/string.rb', line 135

def chop!
end

#chrObject

pure: true builtin: true returns: String= raises: never



141
142
# File 'lib/laser/standard_library/string.rb', line 141

def chr
end

#clearObject

pure: true builtin: true returns: String= raises: never



147
148
# File 'lib/laser/standard_library/string.rb', line 147

def clear
end

#codepointsObject Also known as: each_codepoint

pure: true builtin: true yield_usage: optional raises: never



153
154
# File 'lib/laser/standard_library/string.rb', line 153

def codepoints
end

#concat(int_or_obj) ⇒ Object

pure: true builtin: true returns: String= int_or_obj: Fixnum= | Bignum= | String= raises: never



160
161
# File 'lib/laser/standard_library/string.rb', line 160

def concat(int_or_obj)
end

#count(other_str, *more_strs) ⇒ Object

pure: true builtin: true raises: never other_str: String=



166
167
# File 'lib/laser/standard_library/string.rb', line 166

def count(other_str, *more_strs)
end

#crypt(other_str) ⇒ Object

pure: true builtin: true returns: String= raises: never other_str: String=



173
174
# File 'lib/laser/standard_library/string.rb', line 173

def crypt(other_str)
end

#delete(other_str, *more_strs) ⇒ Object

pure: true builtin: true returns: String= raises: never other_str: String=



180
181
# File 'lib/laser/standard_library/string.rb', line 180

def delete(other_str, *more_strs)
end

#delete!(other_str, *more_strs) ⇒ Object

pure: true builtin: true returns: String= | NilClass raises: never other_str: String=



187
188
# File 'lib/laser/standard_library/string.rb', line 187

def delete!(other_str, *more_strs)
end

#downcaseObject

pure: true builtin: true returns: String= raises: never



193
194
# File 'lib/laser/standard_library/string.rb', line 193

def downcase
end

#downcase!Object

pure: true builtin: true raises: never returns: String= | NilClass



199
200
# File 'lib/laser/standard_library/string.rb', line 199

def downcase!
end

#dumpObject

pure: true builtin: true returns: String= raises: never



205
206
# File 'lib/laser/standard_library/string.rb', line 205

def dump
end

#empty?Boolean

pure: true builtin: true returns: Boolean raises: never

Returns:

  • (Boolean)


215
216
# File 'lib/laser/standard_library/string.rb', line 215

def empty?
end

#encode(*args) ⇒ Object

pure: true builtin: true



219
220
# File 'lib/laser/standard_library/string.rb', line 219

def encode(*args)
end

#encode!(*args) ⇒ Object

pure: true builtin: true



223
224
# File 'lib/laser/standard_library/string.rb', line 223

def encode!(*args)
end

#encodingObject

pure: true builtin: true raises: never returns: Encoding



229
230
# File 'lib/laser/standard_library/string.rb', line 229

def encoding
end

#end_with?(other_str, *more_strs) ⇒ Boolean

pure: true builtin: true returns: Boolean other_str: String= raises: never

Returns:

  • (Boolean)


236
237
# File 'lib/laser/standard_library/string.rb', line 236

def end_with?(other_str, *more_strs)
end

#eql?(other) ⇒ Boolean

pure: true builtin: true returns: Boolean raises: never

Returns:

  • (Boolean)


242
243
# File 'lib/laser/standard_library/string.rb', line 242

def eql?(other)
end

#force_encoding(encoding) ⇒ Object

pure: true builtin: true



246
247
# File 'lib/laser/standard_library/string.rb', line 246

def force_encoding(encoding)
end

#getbyte(index) ⇒ Object

pure: true builtin: true index: Fixnum= | Float= returns: Fixnum= raises: IndexError=



253
254
# File 'lib/laser/standard_library/string.rb', line 253

def getbyte(index)
end

#gsub(pattern, maybe_arg = nil) ⇒ Object

pure: true builtin: true returns: String= yield_usage: optional pattern: Regexp= | String= maybe_arg: String= | Hash= raises: never



262
263
# File 'lib/laser/standard_library/string.rb', line 262

def gsub(pattern, maybe_arg=nil)
end

#gsub!(pattern, maybe_arg = nil) ⇒ Object

pure: true builtin: true yield_usage: optional returns: String= | NilClass= pattern: Regexp= | String= maybe_arg: String= | Hash= raises: never



271
272
# File 'lib/laser/standard_library/string.rb', line 271

def gsub!(pattern, maybe_arg=nil)
end

#hashObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



277
278
# File 'lib/laser/standard_library/string.rb', line 277

def hash
end

#hexObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



283
284
# File 'lib/laser/standard_library/string.rb', line 283

def hex
end

#include?(other_str) ⇒ Boolean

pure: true builtin: true returns: Boolean raises: never other_str: String=

Returns:

  • (Boolean)


290
291
# File 'lib/laser/standard_library/string.rb', line 290

def include?(other_str)
end

#index(substring_or_reg, offset = 0) ⇒ Object

pure: true builtin: true substring_or_reg: String= | Regexp= offset: Fixnum= | Bignum= | Float= raises: never returns: Fixnum= | Bignum= | NilClass=



298
299
# File 'lib/laser/standard_library/string.rb', line 298

def index(substring_or_reg, offset=0)
end

#insert(index, other_str) ⇒ Object

pure: true builtin: true index: Fixnum= | Bignum= other_str: String= raises: IndexError=



305
306
# File 'lib/laser/standard_library/string.rb', line 305

def insert(index, other_str)
end

#inspectObject

pure: true builtin: true returns: String= raises: never



311
312
# File 'lib/laser/standard_library/string.rb', line 311

def inspect
end

#internObject

pure: true builtin: true returns: Symbol raises: never



317
318
# File 'lib/laser/standard_library/string.rb', line 317

def intern
end

#lengthObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



323
324
# File 'lib/laser/standard_library/string.rb', line 323

def length
end

#lines(separator = $/) ⇒ Object Also known as: each_line

pure: true builtin: true yield_usage: optional lines: String= raises: never



330
331
# File 'lib/laser/standard_library/string.rb', line 330

def lines(separator = $/)
end

#ljust(amt, padstr = '') ⇒ Object

pure: true builtin: true returns: String= amt: Fixnum= | Bignum= padstr: String raises: never



339
340
# File 'lib/laser/standard_library/string.rb', line 339

def ljust(amt, padstr='')
end

#lstripObject

pure: true builtin: true returns: String= raises: never



345
346
# File 'lib/laser/standard_library/string.rb', line 345

def lstrip
end

#lstrip!Object

pure: true builtin: true returns: String= | NilClass raises: never



351
352
# File 'lib/laser/standard_library/string.rb', line 351

def lstrip!
end

#match(pattern, pos = 0) ⇒ Object

pure: true builtin: true raises: IndexError= pattern: String= | Regexp= pos: Fixnum= | Bignum=



358
359
# File 'lib/laser/standard_library/string.rb', line 358

def match(pattern, pos=0)
end

#nextObject

pure: true builtin: true returns: String= raises: never



364
365
# File 'lib/laser/standard_library/string.rb', line 364

def next
end

#next!Object

pure: true builtin: true returns: String= raises: never



370
371
# File 'lib/laser/standard_library/string.rb', line 370

def next!
end

#octObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



376
377
# File 'lib/laser/standard_library/string.rb', line 376

def oct
end

#ordObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



382
383
# File 'lib/laser/standard_library/string.rb', line 382

def ord
end

#partition(sep_or_regex) ⇒ Object

pure: true builtin: true returns: Array= raises: never sep_or_regex: String= | Regexp=



389
390
# File 'lib/laser/standard_library/string.rb', line 389

def partition(sep_or_regex)
end

#replace(other_str) ⇒ Object

pure: true builtin: true raises: never other_str: String= returns: String



396
397
# File 'lib/laser/standard_library/string.rb', line 396

def replace(other_str)
end

#reverseObject

pure: true builtin: true returns: String= raises: never



402
403
# File 'lib/laser/standard_library/string.rb', line 402

def reverse
end

#reverse!Object

pure: true builtin: true returns: String= raises: never



408
409
# File 'lib/laser/standard_library/string.rb', line 408

def reverse!
end

#rindex(substring_or_regex, pos = 0) ⇒ Object

pure: true builtin: true substring_or_reg: String= | Regexp= offset: Fixnum= | Bignum= | Float= raises: never returns: Fixnum= | Bignum= | NilClass=



416
417
# File 'lib/laser/standard_library/string.rb', line 416

def rindex(substring_or_regex, pos=0)
end

#rjust(integer, padstr = ' ') ⇒ Object

pure: true builtin: true returns: String= amt: Fixnum= | Bignum= padstr: String raises: never



424
425
# File 'lib/laser/standard_library/string.rb', line 424

def rjust(integer, padstr=' ')
end

#rpartition(sep_or_regex) ⇒ Object

pure: true builtin: true returns: Array= raises: never sep_or_regex: String= | Regexp=



431
432
# File 'lib/laser/standard_library/string.rb', line 431

def rpartition(sep_or_regex)
end

#rstripObject

pure: true builtin: true returns: String= raises: never



437
438
# File 'lib/laser/standard_library/string.rb', line 437

def rstrip
end

#rstrip!Object

pure: true builtin: true returns: String= | NilClass raises: never



443
444
# File 'lib/laser/standard_library/string.rb', line 443

def rstrip!
end

#scan(pattern) ⇒ Object

pure: true builtin: true yield_usage: optional pattern: Regexp= | String= returns: Array= raises: never



451
452
# File 'lib/laser/standard_library/string.rb', line 451

def scan(pattern)
end

#setbyte(index, int) ⇒ Object

pure: true builtin: true index: Fixnum= | Float= returns: Fixnum= raises: IndexError= int: Fixnum= | Float=



459
460
# File 'lib/laser/standard_library/string.rb', line 459

def setbyte(index, int)
end

#sizeObject

pure: true builtin: true returns: Fixnum= | Bignum= raises: never



465
466
# File 'lib/laser/standard_library/string.rb', line 465

def size
end

#slice(*args) ⇒ Object

pure: true builtin: true returns: String=



470
471
# File 'lib/laser/standard_library/string.rb', line 470

def slice(*args)
end

#slice!(*args) ⇒ Object

pure: true builtin: true



474
475
# File 'lib/laser/standard_library/string.rb', line 474

def slice!(*args)
end

#split(pattern = $;, limit = nil) ⇒ Object

pure: true builtin: true returns: Array= pattern: String= | Regexp= limit: Fixnum= raises: never



482
483
# File 'lib/laser/standard_library/string.rb', line 482

def split(pattern=$;, limit=nil)
end

#squeeze(*other_strs) ⇒ Object

pure: true builtin: true returns: String= raises: never



488
489
# File 'lib/laser/standard_library/string.rb', line 488

def squeeze(*other_strs)
end

#squeeze!(*other_strs) ⇒ Object

pure: true builtin: true returns: String= | NilClass raises: never



494
495
# File 'lib/laser/standard_library/string.rb', line 494

def squeeze!(*other_strs)
end

#start_with?(prefix, *prefixes) ⇒ Boolean

pure: true builtin: true returns: Boolean other_str: String= raises: never

Returns:

  • (Boolean)


501
502
# File 'lib/laser/standard_library/string.rb', line 501

def start_with?(prefix, *prefixes)
end

#stripObject

pure: true builtin: true returns: String= raises: never



507
508
# File 'lib/laser/standard_library/string.rb', line 507

def strip
end

#strip!Object

pure: true builtin: true returns: String= | NilClass raises: never



513
514
# File 'lib/laser/standard_library/string.rb', line 513

def strip!
end

#sub(pattern, *rest) ⇒ Object

pure: true builtin: true returns: String= yield_usage: optional pattern: String= | Regexp=



520
521
# File 'lib/laser/standard_library/string.rb', line 520

def sub(pattern, *rest)
end

#sub!(pattern, *rest) ⇒ Object

pure: true builtin: true yield_usage: optional returns: String= | NilClass pattern: String= | Regexp=



527
528
# File 'lib/laser/standard_library/string.rb', line 527

def sub!(pattern, *rest)
end

#succObject

pure: true builtin: true returns: String= raises: never



533
534
# File 'lib/laser/standard_library/string.rb', line 533

def succ
end

#succ!Object

pure: true builtin: true returns: String= raises: never



539
540
# File 'lib/laser/standard_library/string.rb', line 539

def succ!
end

#sum(n = 16) ⇒ Object

pure: true builtin: true returns: Fixnum= | Bignum= n: Fixnum= raises: never



546
547
# File 'lib/laser/standard_library/string.rb', line 546

def sum(n=16)
end

#swapcaseObject

pure: true builtin: true returns: String= raises: never



552
553
# File 'lib/laser/standard_library/string.rb', line 552

def swapcase
end

#swapcase!Object

pure: true builtin: true returns: String= raises: never



558
559
# File 'lib/laser/standard_library/string.rb', line 558

def swapcase!
end

#to_cObject

pure: true builtin: true returns: Complex raises: never



564
565
# File 'lib/laser/standard_library/string.rb', line 564

def to_c
end

#to_fObject

pure: true builtin: true returns: Float raises: never



570
571
# File 'lib/laser/standard_library/string.rb', line 570

def to_f
end

#to_i(base = 10) ⇒ Object

pure: true builtin: true returns: Fixnum= | Bignum= base: Fixnum= raises: ArgumentError=



577
578
# File 'lib/laser/standard_library/string.rb', line 577

def to_i(base=10)
end

#to_rObject

pure: true builtin: true raises: never



582
583
# File 'lib/laser/standard_library/string.rb', line 582

def to_r
end

#to_sObject

pure: true builtin: true returns: String= raises: never



588
589
# File 'lib/laser/standard_library/string.rb', line 588

def to_s
end

#to_strObject

pure: true builtin: true returns: String= raises: never



594
595
# File 'lib/laser/standard_library/string.rb', line 594

def to_str
end

#to_symObject

pure: true builtin: true returns: Symbol raises: never



600
601
# File 'lib/laser/standard_library/string.rb', line 600

def to_sym
end

#tr(from_str, to_str) ⇒ Object

pure: true builtin: true returns: String= from_str: String= to_str: String= raises: never



608
609
# File 'lib/laser/standard_library/string.rb', line 608

def tr(from_str, to_str)
end

#tr!(from_str, to_str) ⇒ Object

pure: true builtin: true from_str: String= to_str: String= raises: never returns: String= | NilClass=



616
617
# File 'lib/laser/standard_library/string.rb', line 616

def tr!(from_str, to_str)
end

#tr_s(from_str, to_str) ⇒ Object

pure: true builtin: true returns: String= from_str: String= to_str: String= raises: never



624
625
# File 'lib/laser/standard_library/string.rb', line 624

def tr_s(from_str, to_str)
end

#tr_s!(from_str, to_str) ⇒ Object

pure: true builtin: true from_str: String= to_str: String= raises: never returns: String= | NilClass=



632
633
# File 'lib/laser/standard_library/string.rb', line 632

def tr_s!(from_str, to_str)
end

#unpack(format) ⇒ Object

pure: true builtin: true returns: Array raises: ArgumentError= format: String=



639
640
# File 'lib/laser/standard_library/string.rb', line 639

def unpack(format)
end

#upcaseObject

pure: true builtin: true returns: String= raises: never



645
646
# File 'lib/laser/standard_library/string.rb', line 645

def upcase
end

#upcase!Object

pure: true builtin: true raises: never returns: String= | NilCLass=



651
652
# File 'lib/laser/standard_library/string.rb', line 651

def upcase!
end

#upto(other_str, exclusive = false) ⇒ Object

pure: true builtin: true yield_usage: optional other_str: String= raises: never



658
659
# File 'lib/laser/standard_library/string.rb', line 658

def upto(other_str, exclusive = false)
end

#valid_encoding?Boolean

pure: true builtin: true returns: Boolean raises: never

Returns:

  • (Boolean)


664
665
# File 'lib/laser/standard_library/string.rb', line 664

def valid_encoding?
end