[Delete the first letter of the character string] Ruby

How to remove the first letter of a string in Ruby

sample.rb


str = "AIUEO"
str[1..-1] # => "Iueo" 

It was simple!

―――――――――――――――――――――――――― Quote source https://myridia.com/dev_posts/view/93 ――――――――――――――――――――――――――

Recommended Posts

[Delete the first letter of the character string] Ruby
[Ruby] Insert, replace, destroy at the end of the character string [b021]
Count the number of occurrences of a string in Ruby
Delete all the contents of the list page [Ruby on Rails]
The nth and n + 1st characters of a Ruby string
About the behavior of ruby Hash # ==
[Java] Delete the elements of List
[Ruby] See the essence of ArgumentError
Various methods of the String class
I read the source of String
[Ruby] Display the contents of variables
[Ruby] Difference between symbol variables and character string variables. About the difference between [: a] and ['a'].
[Rails] How to omit the display of the character string of the link_to method
[Java] I felt as a java beginner. "Why is the first letter of the String type capitalized?" I faced the String type.
[Ruby] I want to output only the odd-numbered characters in the character string
part of the syntax of ruby ​​on rails
[Android] Add an arbitrary character string at the beginning of multiple lines
[Ruby] Cut off the contents of twitter-ads
Ruby from the perspective of other languages
Extract a part of a string with Ruby
Deletes after the specified character from the character string
[Java] Comparison of String type character strings
[Java] Check if the character string is composed only of blanks (= Blank)
Item 63: Beware the performance of string concatenation
[Promotion of Ruby comprehension (1)] When switching from Java to Ruby, first understand the difference.
Character string comparison: I was caught in the skill check problem of Paiza
[Java] How to easily get the longest character string of ArrayList using stream
How to find the cause of the Ruby error
[Ruby] Summary of class definitions. Master the basics.
The story of low-level string comparison in Java
[Ruby on Rails] Until the introduction of RSpec
The story of learning Java in the first programming
I understood the very basics of character input
The story of introducing Ajax communication to ruby
[Java] Get the length of the surrogate pair string
[Java] The confusing part of String and StringBuilder
[Note] Java: Measures the speed of string concatenation
Manage the version of Ruby itself with rbenv
[Ruby] Code to display the day of the week
First touch of the Files class (or Java 8)
I checked the number of taxis with Ruby
Basics of Ruby
Delete any string
[Java] Cut out a part of the character string with Matcher and regular expression
[Ruby] Cut out a string using the slice method
How to delete / update the list field of OneToMany
[Ruby] The role of subscripts in learning elements in arrays
Docker the development environment of Ruby on Rails project
[Ruby] How to find the sum of each digit
Ruby, Nokogiri: Get the element name of the selected node
[Technical memo] About the advantages and disadvantages of Ruby
[Ruby] Class nesting, inheritance, and the basics of self
Get the URL of the HTTP redirect destination in Ruby
The first step to using Xib instead of StoryBoard
[Java] Handling of character strings (String class and StringBuilder class)
Try using the query attribute of Ruby on Rails
[Ruby] Get in the habit of using the dup method when making a copy of a string variable
String Replacement of the case where the regular expression * of the character string search condition contains a line break.