Displaying 1 to 8 from 8 results

replace-string - Replace all substring matches in a string

  •    Javascript

Similar to String#replace(), but supports replacing multiple matches. You could achieve something similar by putting the string in a RegExp constructor with the global flag and passing it to String#replace(), but you would then have to first escape the string anyways.Returns a new string with all needle matches replaced with replacement.

stringz - :100: Zero dependency unicode-aware string tools for NodeJS

  •    Javascript

A really small, performant, zero-dependency, unicode-aware library for working with Strings in Node.js. Javascript has a serious problem with unicode. Even ES6 can’t solve the problem entirely since some characters like the new colored emojis are three bytes instead of two bytes. Sometimes even more! "πŸ‘πŸ½".length returns 4 which is totally wrong (hint: it should be 1!). ES6's Array.from tried to solve this, but that even fails: Array.from("πŸ‘πŸ½") returns ["πŸ‘", "🏽"] which is incorrect. This library tries to tackle all these problems with a mega RegExp. Read More Here.

slice-lines - Fast algorithm for extracting a subset of lines from a string

  •    Javascript

Very efficient module for extracting a subset of lines from a string. Similar to str.slice(beginIndex, endIndex) except that the indexes are lines instead of bytes.

highlight-words-core - Utility functions shared by react-highlight-words and react-native-highlight-words

  •    Javascript

Utility functions shared by react-highlight-words and react-native-highlight-words. MIT License - fork, modify and use however you want.

bstr - A string type for Rust that is not required to be valid UTF-8.

  •    Rust

This crate provides a BString and BStr types that are conventionally UTF-8 for Rust. They differ from the standard library's String and str types in that they are not required to be valid UTF-8, but may be fully or partially valid UTF-8. See this part of the documentation for more details: https://docs.rs/bstr/0.1.0/bstr/#when-should-i-use-byte-strings.

Stryng - Swift strings taken to a whole new syntax level.

  •    Swift

Stryng is designed to make it easier to work with strings by using the common and easy to remember subscript syntax and accessing characters and ranges with Int indices. Swift's strings management is one of the most painful feature of the language. Sure, it's great to have Unicode correctness and efficiency, but this comes at a cost: too much verbosity and complexity.