Coder Social home page Coder Social logo

0xc's Introduction

GPLv3 MELPA Build Status Coverage

0xc

(Pronounced "hex convert")

Base conversion made easy in emacs

Features

  • Base conversion!
  • Intelligent base inference
  • Replace-at-point methods
  • Simple representation of bases up to 36

Installation & Setup

0xc is avilable on Melpa. After installing with M-x package-install <RET> 0xc <RET>, all functions should be available.

Functions

  • 0xc-convert - Simple string-to-string base conversion. Accepts prefix options and allows interactive use.
  • 0xc-convert-point - Replace the number at point with a converted representation.

Base Hinting

A number literal's base can be roughly determined via heuristics, but you can use the following hints to ensure 0xc gets it right:

  • 0x is a hexadecimal literal
  • 0b is a binary literal
  • 0t is a ternary literal
  • 0d is a decimal literal
  • 0o is an octal literal

Alternatively, you can prefix a base-n number with n:. 0xc will automatically remove any of these base hints when converting

Future

More tests are next. If you feel like beating me to it, open a pull request.

License

GPLv3+

0xc's People

Contributors

adamniederer avatar dcluna avatar rrthomas avatar syohex avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.