All Projects → jonschlinkert → right-align

jonschlinkert / right-align

Licence: MIT license
Right-align the text in a string.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to right-align

justified
Wrap, align and justify the words in a string.
Stars: ✭ 30 (+57.89%)
Mutual labels:  string, align
memchr
Optimized string search routines for Rust.
Stars: ✭ 474 (+2394.74%)
Mutual labels:  string
Util
A collection of useful utility functions
Stars: ✭ 201 (+957.89%)
Mutual labels:  string
Stringsimilarity.net
A .NET port of java-string-similarity
Stars: ✭ 242 (+1173.68%)
Mutual labels:  string
Codejam
Set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another
Stars: ✭ 217 (+1042.11%)
Mutual labels:  string
string-combinations
A simple, low-memory footprint function to generate all string combinations from a series of characters.
Stars: ✭ 25 (+31.58%)
Mutual labels:  string
Printj
📜 sprintf for JS
Stars: ✭ 182 (+857.89%)
Mutual labels:  string
Number To Words
Number to string standalone PHP library with i18n. Drivers for numbers and currency included.
Stars: ✭ 234 (+1131.58%)
Mutual labels:  string
Case
String case utitility: convert, identify, flip, extend
Stars: ✭ 237 (+1147.37%)
Mutual labels:  string
NString
A collection of utilities for working with strings in .NET.
Stars: ✭ 34 (+78.95%)
Mutual labels:  string
Php To String
Cast any php value into a string
Stars: ✭ 219 (+1052.63%)
Mutual labels:  string
Pupa
Simple micro templating
Stars: ✭ 231 (+1115.79%)
Mutual labels:  string
Data-Structure-Algorithm-Programs
This Repo consists of Data structures and Algorithms
Stars: ✭ 464 (+2342.11%)
Mutual labels:  string
Blitz
Android Library: Set self-updating string with relative time in TextView (e.g. 5 minutes ago)
Stars: ✭ 217 (+1042.11%)
Mutual labels:  string
nlcst-to-string
utility to transform an nlcst tree to a string
Stars: ✭ 16 (-15.79%)
Mutual labels:  string
Str
A fast, solid and strong typed string manipulation library with multibyte support
Stars: ✭ 199 (+947.37%)
Mutual labels:  string
Superstring
A fast and memory-optimized string library for C++
Stars: ✭ 252 (+1226.32%)
Mutual labels:  string
DS ALGO
Data Structures and algorithms
Stars: ✭ 20 (+5.26%)
Mutual labels:  string
pascalcase
Convert a string to pascal case (upper camel case). Used by more than 8.7 million projects on GitHub! Please follow this library's author: https://github.com/jonschlinkert
Stars: ✭ 35 (+84.21%)
Mutual labels:  string
cs string
Header-only library providing unicode aware string support for C++
Stars: ✭ 91 (+378.95%)
Mutual labels:  string

right-align NPM version

Right-align the text in a string.

Install with npm

$ npm i right-align --save

Usage

var rightAlign = require('right-align');
rightAlign(string);

Example

If used on the following:

Lorem ipsum dolor sit amet,
consectetur adipiscing
elit, sed do eiusmod tempor incididunt
ut labore et dolore
magna aliqua. Ut enim ad minim
veniam, quis

The result would be:

           Lorem ipsum dolor sit amet,
                consectetur adipiscing
elit, sed do eiusmod tempor incididunt
                   ut labore et dolore
        magna aliqua. Ut enim ad minim
                          veniam, quis

Related projects

  • align-text: Align the text in a string.
  • center-align: Center-align the text in a string.
  • justify: Left or right (or both) justify text using a custom width and character
  • repeat-string: Repeat the given string n times. Fastest implementation for repeating a string.
  • repeat-element: Create an array by repeating the given value n times.
  • word-wrap: Wrap words to a specified length.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on June 09, 2015.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].