mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c: [DOC] Add more documentation for File.basename by @avdi [fix GH-550][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
488b8befc2
commit
d89b64ddd7
1 changed files with 3 additions and 1 deletions
4
file.c
4
file.c
|
@ -3832,10 +3832,12 @@ ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encodin
|
||||||
* <code>File::ALT_SEPARATOR</code> as the separator when
|
* <code>File::ALT_SEPARATOR</code> as the separator when
|
||||||
* <code>File::ALT_SEPARATOR</code> is not <code>nil</code>. If
|
* <code>File::ALT_SEPARATOR</code> is not <code>nil</code>. If
|
||||||
* <i>suffix</i> is given and present at the end of <i>file_name</i>,
|
* <i>suffix</i> is given and present at the end of <i>file_name</i>,
|
||||||
* it is removed.
|
* it is removed. If <i>suffix</i> is ".*", any extension will be
|
||||||
|
* removed.
|
||||||
*
|
*
|
||||||
* File.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb"
|
* File.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb"
|
||||||
* File.basename("/home/gumby/work/ruby.rb", ".rb") #=> "ruby"
|
* File.basename("/home/gumby/work/ruby.rb", ".rb") #=> "ruby"
|
||||||
|
* File.basename("/home/gumby/work/ruby.rb", ".*") #=> "ruby"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue