w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • Ruby on Rails
  • Ruby
  • Classes
  • String

ext

ext(newext='')
Instance Public methods

Replace the file extension with newext. If there is no extension on the string, append the new extension to the end. If the new extension is not given, or is the empty string, remove any existing extension.

ext is a user added method for the String class.

Links:
  • https://github.com/ruby/ruby/blob/9c66bad9f3d522d50d4a45ef8a3a92abbf93229f/lib/rake/ext/string.rb#L14
doc_ruby_on_rails
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
ext ext() Instance Public methods
sub_ext sub_ext(p1) Instance Public methods Return a pathname with repl added as a suffix to the basename. If self has no extension part, repl i
create_ext create_ext(p1, p2, p3 = v3) Instance Public methods Array to X509_EXTENSION Structure: âlnâ, âvalueâ, bool_critical or âsnâ, âvalueâ,
TokyoTyrant::ext (PECL tokyo_tyrant >= 0.1.0) Execute a remote script public string TokyoTyrant::ext ( string $n
PDF_begin_page_ext (PECL pdflib >= 2.0.0) Start new page bool PDF_begin_page_ext ( resource $pdfdoc, float $width,


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions