All Projects → rgrinberg → stringext

rgrinberg / stringext

Licence: MIT license
Extra string functions for OCaml

Programming Languages

ocaml
1615 projects
Makefile
30231 projects

Projects that are alternatives of or similar to stringext

Litestringbuilder
Alternative to the System.Text.StringBuilder C# class.
Stars: ✭ 48 (+140%)
Mutual labels:  string, string-manipulation
Voca rs
Voca_rs is the ultimate Rust string library inspired by Voca.js, string.py and Inflector, implemented as independent functions and on Foreign Types (String and str).
Stars: ✭ 167 (+735%)
Mutual labels:  string, string-manipulation
Strman Java
A Java 8 string manipulation library.
Stars: ✭ 1,362 (+6710%)
Mutual labels:  string, string-manipulation
Stringplus
Funny and minimal string library for C++ inspired by underscore.string
Stars: ✭ 7 (-65%)
Mutual labels:  string, string-manipulation
Superstring.py
A fast and memory-optimized string library for heavy-text manipulation in Python
Stars: ✭ 231 (+1055%)
Mutual labels:  string, string-manipulation
Mightystring
Making Ruby Strings Powerful
Stars: ✭ 28 (+40%)
Mutual labels:  string, string-manipulation
Androidlibrary
Android library to reveal or obfuscate strings and assets at runtime
Stars: ✭ 162 (+710%)
Mutual labels:  string, string-manipulation
Strtk
C++ String Toolkit Library
Stars: ✭ 113 (+465%)
Mutual labels:  string, string-manipulation
split-on-first
Split a string on the first occurrence of a given separator
Stars: ✭ 68 (+240%)
Mutual labels:  string, string-manipulation
Util
A collection of useful utility functions
Stars: ✭ 201 (+905%)
Mutual labels:  string, string-manipulation
Portable Utf8
🉑 Portable UTF-8 library - performance optimized (unicode) string functions for php.
Stars: ✭ 405 (+1925%)
Mutual labels:  string, string-manipulation
node-red-contrib-string
Provides a string manipulation node with a chainable UI based on the concise and lightweight stringjs.com.
Stars: ✭ 15 (-25%)
Mutual labels:  string, string-manipulation
Tiny Utf8
Unicode (UTF-8) capable std::string
Stars: ✭ 322 (+1510%)
Mutual labels:  string, string-manipulation
Cracking The Coding Interview
Solutions for Cracking the Coding Interview - 6th Edition
Stars: ✭ 35 (+75%)
Mutual labels:  string, string-manipulation
safe-string-interpolation
A type driven approach to string interpolation, aiming at consistent, secure, and only-human-readable logs and console outputs !
Stars: ✭ 14 (-30%)
Mutual labels:  string, string-manipulation
Str
A fast, solid and strong typed string manipulation library with multibyte support
Stars: ✭ 199 (+895%)
Mutual labels:  string, string-manipulation
vbml
Way to check, match and resist.
Stars: ✭ 27 (+35%)
Mutual labels:  string, string-manipulation
normalize-text
📝 Provides a simple API to normalize texts, whitespaces, paragraphs & diacritics.
Stars: ✭ 54 (+170%)
Mutual labels:  string, string-manipulation
unescape-js
Unescape special characters encoded by JavaScript escape sequences
Stars: ✭ 36 (+80%)
Mutual labels:  string
PSStringScanner
Provides lexical scanning operations on a String
Stars: ✭ 45 (+125%)
Mutual labels:  string

Stringext -- Extra string functions fo OCaml

Extra string functions for OCaml. Mainly splitting. All functions are in the Stringext module. Here's a snippet of most useful functions out of the mli:

Api Documentation

(** string_after [s] [n] returns the substring of [s] that is after
    character [n] *)
val string_after : string -> int -> string

(** equivalent to [Str.quote] *)
val quote : string -> string

(** split [?max] [s] [~on] splits [s] on every [on] occurence upto
    [max] number of items if [max] is specified. [max] is assumed to
    be a small number if specified. To not cause stack overflows *)
val split : ?max:int -> string -> on:char -> string list

(** full_split [s] [~on] will split [s] on every occurence
    of [on] but will add the separators between the tokens. Maintains
    the invariant:

    String.concat (full_split s ~on) =s *)
val full_split : string -> on:char -> string list

(** Trims spaces on the left of the string. In case no trimming is needed
    the same string is returned without copying *)
val trim_left : string -> string

(** split_strim_left [s] [~on] [~trim] splits [s] on every character
    in [on]. Characters in [trim] are trimmed from the left of every
    result element *)
val split_trim_left : string -> on:string -> trim:string -> string list

val of_char : char -> string

val of_list : char list -> string

val to_list : string -> char list

val to_array : string -> char array

val of_array : char array -> string

val find_from : ?start:int -> string -> pattern:string -> int option

val replace_all : string -> pattern:string -> with_:string -> string

val replace_all_assoc : string -> (string * string) list -> string

val cut : string -> on:string -> (string * string) option
(** [String.cut on s] is either the pair [Some (l,r)] of the two
    (possibly empty) substrings of [s] that are delimited by the first
    match of the non empty onarator string [on] or [None] if [on]
    can't be matched in [s]. Matching starts from the beginning of [s].

    The invariant [l ^ on ^ r = s] holds.

    @raise Invalid_argument if [on] is the empty string. *)

val rcut : string -> on:string -> (string * string) option
(** [String.rcut on s] is like {!cut} but the matching is done backwards
    starting from the end of [s].

    @raise Invalid_argument if [on] is the empty string. *)

val chop_prefix : string -> prefix:string -> string option

val drop : string -> int -> string

val take : string -> int -> string

(** [trim_left_sub s ~pos ~len ~chars] Trim all characters inside [chars]
    from [s] starting from [pos] and up to [len] *)
val trim_left_sub : string -> pos:int -> len:int -> chars:string -> string
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].