Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement File.extname method #1219

Closed
ggrossetie opened this issue Dec 5, 2015 · 0 comments
Closed

Implement File.extname method #1219

ggrossetie opened this issue Dec 5, 2015 · 0 comments

Comments

@ggrossetie
Copy link
Member

In Asciidoctor.js we are using this implementation:

  def self.extname(path)
    return '' if path.nil_or_empty?
    last_dot_idx = path[1..-1].rindex('.')
    last_dot_idx.nil? ? '' : path[(last_dot_idx + 1)..-1]
  end
ggrossetie added a commit to ggrossetie/opal that referenced this issue Feb 14, 2016
ggrossetie added a commit to ggrossetie/opal that referenced this issue Feb 20, 2016
ggrossetie added a commit to ggrossetie/opal that referenced this issue Feb 22, 2016
ggrossetie added a commit to ggrossetie/opal that referenced this issue Feb 22, 2016
elia added a commit that referenced this issue Feb 22, 2016
Resolves #1219, Implement File.extname method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant