Class | String |
In: |
lib/rbot/botuser.rb
lib/rbot/core/utils/extends.rb lib/rbot/irc.rb lib/rbot/ircsocket.rb lib/rbot/load-gettext.rb |
Parent: | Object |
% | -> | _old_format_m |
Format - Uses str as a format specification, and returns the result of applying it to arg. If the format specification contains more than one substitution, then arg must be an Array containing the values to be substituted. See Kernel::sprintf for details of the format string. This is the default behavior of the String class.
(e.g.) "%s, %s" % ["Masao", "Mutoh"]
Also you can use a Hash as the "named argument". This is recommanded way for Ruby-GetText because the translators can understand the meanings of the msgids easily.
(e.g.) "%{firstname}, %{familyname}" % {:firstname => "Masao", :familyname => "Mutoh"}
This method checks if the receiver contains IRC glob characters
IRC has a very primitive concept of globs: a * stands for "any number of arbitrary characters", a ? stands for "one and exactly one arbitrary character". These characters can be escaped by prefixing them with a slash (\).
A known limitation of this glob syntax is that there is no way to escape the escape character itself, so it‘s not possible to build a glob pattern where the escape character precedes a glob.
This method returns a string which is the downcased version of the receiver, according to the given casemap
This is the same as the above, except that the string is altered in place
See also the discussion about irc_downcase
Upcasing functions are provided too
See also the discussion about irc_downcase
This method will return a purified version of the receiver, with all HTML stripped off and some of it converted to IRC formatting
We keep extending String, this time adding a method that converts a String into an Irc::Channel object
We keep extending String, this time adding a method that converts a String into an Irc::Netmask object
This method is used to convert the receiver into a Regular Expression that matches according to the IRC glob syntax