Results for: "partition"

No documentation available
No documentation available
No documentation available

Add the –version option to the option parser.

Compile a OptionalParameterNode node

Dispatch enter and leave events for OptionalParameterNode nodes and continue walking the tree.

Copy a OptionalParameterNode node

Replaces the content of self with the content of other_array; returns self:

a = [:foo, 'bar', 2]
a.replace(['foo', :bar, 3]) # => ["foo", :bar, 3]

Replaces the contents of self with the contents of other_string:

s = 'foo'        # => "foo"
s.replace('bar') # => "bar"

Returns whether self starts with any of the given string_or_regexp.

Matches patterns against the beginning of self. For each given string_or_regexp, the pattern is:

Returns true if any pattern matches the beginning, false otherwise:

'hello'.start_with?('hell')               # => true
'hello'.start_with?(/H/i)                 # => true
'hello'.start_with?('heaven', 'hell')     # => true
'hello'.start_with?('heaven', 'paradise') # => false
'тест'.start_with?('т')                   # => true
'こんにちは'.start_with?('こ')              # => true

Related: String#end_with?.

Returns whether ASCII-compatible or not.

Encoding::UTF_8.ascii_compatible?     #=> true
Encoding::UTF_16BE.ascii_compatible?  #=> false

Waits until IO is priority and returns a truthy value or a falsy value when times out. Priority data is sent and received using the Socket::MSG_OOB flag and is typically limited to streams.

You must require ‘io/wait’ to use this method.

Returns true if matching against re can be done in linear time to the input string.

Regexp.linear_time?(/re/) # => true

Note that this is a property of the ruby interpreter, not of the argument regular expression. Identical regexp can or cannot run in linear time depending on your ruby binary. Neither forward nor backward compatibility is guaranteed about the return value of this method. Our current algorithm is (*1) but this is subject to change in the future. Alternative implementations can also behave differently. They might always return false for everything.

(*1): doi.org/10.1109/SP40001.2021.00032

Dup internal hash.

Equivalent to self.to_s.start_with?; see String#start_with?.

Duplicates a StringScanner object.

Replaces the entire contents of self with the contents of other_hash; returns self:

h = {foo: 0, bar: 1, baz: 2}
h.replace({bat: 3, bam: 4}) # => {:bat=>3, :bam=>4}
No documentation available

The version of the Marshal format for your Ruby.

How String Gem paths should be split. Overridable for esoteric platforms.

Compile a OptionalKeywordParameterNode node

Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue walking the tree.

Copy a OptionalKeywordParameterNode node

No documentation available

Compile a AlternationPatternNode node

Search took: 2ms  ·  Total Results: 3946