module Gemmy::Patches::StringPatch::InstanceMethods::Rotate
Public Instance Methods
rotate(count=1)
click to toggle source
facets 'abcdefgh'.rotate(2) #=> 'cdefghab' 'abcdefgh'.rotate(-2) #=> 'ghabcdef'
# File lib/gemmy/patches/string_patch.rb, line 93 def rotate(count=1) count+=self.length if count<0 self.slice(count,self.length-count)+self.slice(0,count) end