All Projects โ†’ microsoft โ†’ Bistring

microsoft / Bistring

Licence: mit
Bidirectionally transformed strings

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Bistring

strings
String helper methods and an inflector
Stars: โœญ 31 (-90.49%)
Mutual labels:  string
type-reverse
๐Ÿฆ„ Lightweight reverse utility around strings, arrays, numbers and more.
Stars: โœญ 30 (-90.8%)
Mutual labels:  string
Attributedstring
ๅŸบไบŽSwiftๆ’ๅ€ผๆ–นๅผไผ˜้›…็š„ๆž„ๅปบๅฏŒๆ–‡ๆœฌ, ๆ”ฏๆŒ็‚นๅ‡ป้•ฟๆŒ‰ไบ‹ไปถ, ๆ”ฏๆŒไธๅŒ็ฑปๅž‹่ฟ‡ๆปค, ๆ”ฏๆŒ่‡ชๅฎšไน‰่ง†ๅ›พ็ญ‰.
Stars: โœญ 294 (-9.82%)
Mutual labels:  string
poplar-trie
C++17 implementation of memory-efficient dynamic tries
Stars: โœญ 47 (-85.58%)
Mutual labels:  string
kirai
String formatting library for Java, Android, Web and Unix Terminal
Stars: โœญ 69 (-78.83%)
Mutual labels:  string
Stryng
Swift strings taken to a whole new syntax level.
Stars: โœญ 255 (-21.78%)
Mutual labels:  string
String.prototype.matchAll
Spec-compliant polyfill for String.prototype.matchAll, in ES2020
Stars: โœญ 14 (-95.71%)
Mutual labels:  string
Voca
The ultimate JavaScript string library
Stars: โœญ 3,387 (+938.96%)
Mutual labels:  string
lzbase62
LZ77(LZSS) based compression algorithm in base62 for JavaScript.
Stars: โœญ 38 (-88.34%)
Mutual labels:  string
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: โœญ 268 (-17.79%)
Mutual labels:  string
widestring-rs
A wide string Rust library for converting to and from wide Unicode strings.
Stars: โœญ 48 (-85.28%)
Mutual labels:  string
common-words
Updated list of the 100 most common words in the English language. Useful for excluding these words from arrays.
Stars: โœญ 13 (-96.01%)
Mutual labels:  string
Naza
๐Ÿ€ Go basic library. || Go่ฏญ่จ€ๅŸบ็ก€ๅบ“
Stars: โœญ 253 (-22.39%)
Mutual labels:  string
indexed-string-variation
Experimental JavaScript module to generate all possible variations of strings over an alphabet using an n-ary virtual tree
Stars: โœญ 16 (-95.09%)
Mutual labels:  string
Multilanguages
Android ๅคš่ฏญ็ง้€‚้…ๆก†ๆžถ๏ผŒๅ…ผๅฎน้ซ˜็‰ˆๆœฌ๏ผŒ้€‚้…็ฌฌไธ‰ๆ–นๅบ“่ฏญ็ง
Stars: โœญ 299 (-8.28%)
Mutual labels:  string
safe-string-interpolation
A type driven approach to string interpolation, aiming at consistent, secure, and only-human-readable logs and console outputs !
Stars: โœญ 14 (-95.71%)
Mutual labels:  string
nim-ustring
utf-8 string for Nim
Stars: โœญ 12 (-96.32%)
Mutual labels:  string
Mlib
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
Stars: โœญ 321 (-1.53%)
Mutual labels:  string
Coderchef Kitchen
The official repository for our programming kitchen which consists of 50+ delicious programming recipes having all the interesting ingredients ranging from dynamic programming, graph theory, linked lists and much more. All the articles contain beautiful images and some gif/video at times to help clear important concepts.
Stars: โœญ 306 (-6.13%)
Mutual labels:  string
Obfuscate
Guaranteed compile-time string literal obfuscation header-only library for C++14
Stars: โœญ 260 (-20.25%)
Mutual labels:  string

bistring

|Build status| |Documentation status|

The bistring library provides non-destructive versions of common string processing operations like normalization, case folding, and find/replace. Each bistring remembers the original string, and how its substrings map to substrings of the modified version.

For example:

.. code-block:: python

>>> from bistring import bistr
>>> s = bistr('๐•ฟ๐–๐–Š ๐––๐–š๐–Ž๐–ˆ๐–, ๐–‡๐–—๐–”๐–œ๐–“ ๐ŸฆŠ ๐–๐–š๐–’๐–•๐–˜ ๐–”๐–›๐–Š๐–— ๐–™๐–๐–Š ๐–‘๐–†๐–Ÿ๐–ž ๐Ÿถ')
>>> s = s.normalize('NFKD')     # Unicode normalization
>>> s = s.casefold()            # Case-insensitivity
>>> s = s.replace('๐ŸฆŠ', 'fox')  # Replace emoji with text
>>> s = s.replace('๐Ÿถ', 'dog')
>>> s = s.sub(r'[^\w\s]+', '')  # Strip everything but letters and spaces
>>> s = s[:19]                  # Extract a substring
>>> s.modified                  # The modified substring, after changes
'the quick brown fox'
>>> s.original                  # The original substring, before changes
'๐•ฟ๐–๐–Š ๐––๐–š๐–Ž๐–ˆ๐–, ๐–‡๐–—๐–”๐–œ๐–“ ๐ŸฆŠ'

Languages

|PyPI version| |npm version|

bistring is available in multiple languages, currently Python <python>_ and JavaScript/TypeScript <js>_. Ports to other languages are planned for the near future.

The code is structured similarly in each language to make it easy to share algorithms, tests, and fixes between them. The main differences come from trying to mirror the language's built-in string API. If you want to contribute a bug fix or a new feature, feel free to implement it in any one of the supported languages, and we'll try to port it to the rest of them.

Demo

Click here <https://microsoft.github.io/bistring/demo.html>_ for a live demo of the bistring library in your browser.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct <https://opensource.microsoft.com/codeofconduct/>. For more information see the Code of Conduct FAQ <https://opensource.microsoft.com/codeofconduct/faq/> or contact [email protected] <mailto:[email protected]>_ with any additional questions or comments.

.. |Build status| image:: https://github.com/microsoft/bistring/actions/workflows/ci.yml/badge.svg :target: https://github.com/microsoft/bistring/actions/workflows/ci.yml .. |Documentation status| image:: https://readthedocs.org/projects/bistring/badge/?version=latest :target: https://bistring.readthedocs.io/en/latest/?badge=latest .. |PyPI version| image:: https://badge.fury.io/py/bistring.svg :target: https://pypi.org/project/bistring/ .. |npm version| image:: https://badge.fury.io/js/bistring.svg :target: https://www.npmjs.com/package/bistring

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].