Our great sponsors
-
Puts Debuggerer
Ruby library for improved puts debugging, automatically displaying bonus useful information such as source line number and source code.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
"BoringRails!".delete_prefix("Boring") #=> "Rails!" "#programming".delete_prefix("#") #=> "programming" "ISBN: 9780091929787".delete_prefix("ISBN: ") #=> "9780091929787" "mailto:[email protected]".delete_prefix("mailto:") #=> "[email protected]" github_url = "https://github.com/rails/rails" repo_name = github_url.delete_prefix("https://github.com/") #=> "rails/rails" "report.csv".delete_suffix(".csv") #=> "report" "150 cm".delete_suffix("cm").to_i #=> 150
"BoringRails!".delete_prefix("Boring") #=> "Rails!" "#programming".delete_prefix("#") #=> "programming" "ISBN: 9780091929787".delete_prefix("ISBN: ") #=> "9780091929787" "mailto:[email protected]".delete_prefix("mailto:") #=> "[email protected]" github_url = "https://github.com/rails/rails" repo_name = github_url.delete_prefix("https://github.com/") #=> "rails/rails" "report.csv".delete_suffix(".csv") #=> "report" "150 cm".delete_suffix("cm").to_i #=> 150
Related posts
- Introducing Rails mini series
- A Tale of Hashery and Woe: How Mutable Hash Keys Led to an ActiveRecord Bug
- I am new to programming. I went through a free Udacity course on JavaScript and am trying to figure out how to actually practice what I've learned.
- I made a GitHub repo tracker with Nuxt 3 to track when Nuxt 3 is ready
- Show HN: Find alternatives to almost any popular GitHub repo