underscore.string - String manipulation helpers for javascript

  •        14

Javascript lacks complete string manipulation operations. This is an attempt to fill that gap. List of build-in methods can be found for example from Dive Into JavaScript. Originally started as an Underscore.js extension but is a full standalone library nowadays.Upgrading from 2.x to 3.x? Please read the changelog.



sprintf-js : ^1.0.3
util-deprecate : ^1.0.2



Related Projects

underscore-contrib - The brass buckles on Underscore's utility belt

  •    Javascript

The brass buckles on Underscore's utility belt -- a contributors' library for Underscore. At the moment there are no cross-contrib dependencies (i.e. each library can stand by itself), but that may change in the future.

bottomline - A full-on PHP manipulation utility-belt that provides support for the usual functional

  •    PHP

bottomline is a PHP utility library, similar to Underscore/Lodash, that utilizes namespaces and dynamic autoloading to improve performance. NOTE: bottomline is not currently in feature parity with Underscore/Lodash. Review the contributing section for more information.

node.inflection - A port of inflection-js to node.js module

  •    Javascript

inflection-js is a port of the functionality from Ruby on Rails' Active Support Inflection classes into Javascript. inflection is a port of inflection-js to node.js npm package. Instead of extending JavaScript native String object like inflection-js does, inflection separate the methods to a independent package to avoid unexpected behaviors. Note: This library uses Wiktionary as its reference.

humps - 🐫 Underscore-to-camelCase converter (and vice versa) for strings and object keys in JavaScript

  •    Javascript

Underscore-to-camelCase converter (and vice versa) for strings and object keys in JavaScript. When converting object keys, it will walk the structure, converting any nested objects (or arrays of nested objects) along the way. Handy for converting JSON between JavaScript and Ruby/Rails APIs.

trine - A utility library for modern JavaScript.

  •    Javascript

A utility library for modern JavaScript. Trine is a utility library geared at tapping the full potential of functional programming in JS, in the vein of lodash, underscore and Ramda.

magic-string - Manipulate strings like a wizard

  •    Javascript

Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a source map at the end of it. You've thought about using something like recast (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript).Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps.

strman-java - A Java 8 string manipulation library.

  •    Java

A Java 8 library for working with Strings. You can learn about all the String utility functions implemented in strman library by reading the documentation. To use strman in your application, you have to add strman to your classpath. strman is available on Maven Central so you just need to add dependency in your favorite build tool as shown below.


  •    JQuery

jQuery Feature for SharePoint 2010 that includes jQuery, jQuery UI, Underscore along with a configurable PageHeadControl to specify which version of those libraries you would like to have loaded (or none at all) on every page in a given site.

underscore.py - Python port of underscore.js

  •    Python

NOTE: It's obvious that python already has nearly all features of underscore library built-in. I'm not trying to fill any gap in python. If you are coming from JavaScript this library will provide you a familiar interface, a set of tools you already know how to use and micro templating functionality. Use it wisely and try to use built-in functions wherever possible.

CamelCaseMotion - A vim script to provide CamelCase motion through words (fork of inkarkat's camelcasemotion script)

  •    Vim

This script defines motions similar to w, b, e which do not move word-wise (forward/backward), but Camel-wise; i.e. to word boundaries and uppercase letters. The motions also work on underscore notation, where words are delimited by underscore ('_') characters. From here on, both CamelCase and underscore_notation entities are referred to as "words" (in double quotes). Just like with the regular motions, a [count] can be prepended to move over multiple "words" at once. Outside of "words" (e.g. in non-keyword characters like / or ;), the new motions move just like the regular motions. Vim provides a built-in iw text object called 'inner word', which works in operator-pending and visual mode. Analog to that, this script defines inner "word" motions which select the "word" (or multiple "words" if a [count] is given) where the cursor is located.

underscore - JavaScript's utility _ belt

  •    Javascript

JavaScript's functional programming helper library.

go-underscore - Helpfully Functional Go - A useful collection of Go utilities

  •    Go

A useful collection of Go utilities. Designed for programmer happiness.This package is in heavy flux at the moment as I work to incorporate feedback from various sources.

underscore-cli - Command-line utility-belt for hacking JSON and Javascript.

  •    Javascript

JSON is an excellent data interchange format and rapidly becoming the preferred format for Web APIs. Thusfar, most of the tools to process it are very limited. Yet, when working in JavaScript, JSON is fluid and natural. Or it can form the backbone of a rich, full-powered JavaScript command-line, inspired by "perl -pe", and doing for structured data what sed, awk, and grep do for text.

valentine - JavaScripts Functional Sister

  •    Javascript

JavaScript's Sister, and protector — inspired by Underscore; Valentine provides you with type checking, functional iterators, and common utility helpers such as waterfalls, queues, and parallels; all utilizing native JavaScript methods for optimal speed. As of version 2.0.0 — Valentine no longer supports <= IE8 and <= Safari 4. It's been real, but time to move on. To access this level of support, use the 1.8 tag.

axax - Async Iterator Extensions for JavaScript e.g. map, reduce, filter, flatMap, etc.

  •    TypeScript

A library of async iterator extensions for JavaScript including map, reduce, filter, flatMap, pipe and more. Async iterators are a useful way to handle asynchronous streams. This library adds a number of utility methods similar to those found in lodash, underscore, Ramda or RxJs.

Fuzzy string matching algorithm in C# and LINQ


Fuzzy matching strings. Find out how similar two string is, and find the best fuzzy matching string from a string table. Given a string (strA) and a big string table. Find the likeness or similarity of the string in the string table. Using C# and LINQ

SoftwareBotany.Ivy String Utils w/ Quoted Delimited (CSV) & Fixed-Width Parsers


The Software Botany Ivy project is a library containing various string utilities. Included in the library are fluent APIs for parsing and creating quoted delimited and fixed-width positional text. For example, quoted CSV such as that used by Microsoft Excel is supported. The ...


  •    ASPNET

This utility strips out viewstate string and replaces it with a 44 byte string. This means that your viewstate will always be 44bytes instead of 100KB or greater. It has two modes or persistance on the server

flare-floss - FireEye Labs Obfuscated String Solver - Automatically extract obfuscated strings from malware

  •    Python

Rather than heavily protecting backdoors with hardcore packers, many malware authors evade heuristic detections by obfuscating only key portions of an executable. Often, these portions are strings and resources used to configure domains, files, and other artifacts of an infection. These key features will not show up as plaintext in output of the strings.exe utility that we commonly use during basic static analysis. The FireEye Labs Obfuscated String Solver (FLOSS) uses advanced static analysis techniques to automatically deobfuscate strings from malware binaries. You can use it just like strings.exe to enhance basic static analysis of unknown binaries.