Coder Social home page Coder Social logo

purescript-strings's Introduction

Module Documentation

Module Data.Char

Types

Char

newtype Char

Type Class Instances

eqChar

instance eqChar :: Eq Char

ordChar

instance ordChar :: Ord Char

showChar

instance showChar :: Show Char

Values

charString

charString :: Char -> String

fromCharCode

fromCharCode :: Number -> Char

toCharCode

toCharCode :: Char -> Number

Module Data.String

Values

charAt

charAt :: Number -> String -> Maybe Char

charCodeAt

charCodeAt :: Number -> String -> Maybe Number

count

count :: (Char -> Boolean) -> String -> Number

drop

drop :: Number -> String -> String

dropWhile

dropWhile :: (Char -> Boolean) -> String -> String

fromChar

fromChar :: Char -> String

fromCharArray

fromCharArray :: [Char] -> String

indexOf

indexOf :: String -> String -> Number

indexOf'

indexOf' :: String -> Number -> String -> Number

joinWith

joinWith :: String -> [String] -> String

lastIndexOf

lastIndexOf :: String -> String -> Number

lastIndexOf'

lastIndexOf' :: String -> Number -> String -> Number

length

length :: String -> Number

localeCompare

localeCompare :: String -> String -> Number

null

null :: String -> Boolean

replace

replace :: String -> String -> String -> String

singleton

singleton :: Char -> String

split

split :: String -> String -> [String]

take

take :: Number -> String -> String

takeWhile

takeWhile :: (Char -> Boolean) -> String -> String

toCharArray

toCharArray :: String -> [Char]

toLower

toLower :: String -> String

toUpper

toUpper :: String -> String

trim

trim :: String -> String

uncons

uncons :: String -> Maybe { tail :: String, head :: Char }

Module Data.String.Regex

Types

Regex

data Regex :: *

RegexFlags

newtype RegexFlags
  = RegexFlags { unicode :: Boolean, sticky :: Boolean, multiline :: Boolean, ignoreCase :: Boolean, global :: Boolean }

Type Class Instances

boolLikeRegexFlags

instance boolLikeRegexFlags :: BoolLike RegexFlags

eqRegexFlags

instance eqRegexFlags :: Eq RegexFlags

semiGroupRegexFlags

Example usage: regex "Foo" $ global <> ignoreCase is equivalent to /Foo/ig

instance semiGroupRegexFlags :: Semigroup RegexFlags

showRegex

instance showRegex :: Show Regex

showRegexFlags

instance showRegexFlags :: Show RegexFlags

Values

flags

flags :: Regex -> RegexFlags

global

Flags where global : true and all others are false

global :: RegexFlags

ignoreCase

Flags where ignoreCase : true and all others are false

ignoreCase :: RegexFlags

match

match :: Regex -> String -> Maybe [String]

multiline

Flags where multiline : true and all others are false

multiline :: RegexFlags

newRegexFlags

Produce a new RegexFlags from Booleans

newRegexFlags :: Boolean -> Boolean -> Boolean -> Boolean -> Boolean -> RegexFlags

noFlags

All flags are set to false. Useful as a base for building flags or a default.

noFlags :: RegexFlags

onRegexFlags

Perform a Boolean comparison across RegexFlags

onRegexFlags :: (Boolean -> Boolean -> Boolean) -> RegexFlags -> RegexFlags -> RegexFlags

parseFlags

parseFlags :: String -> RegexFlags

regex

regex :: String -> RegexFlags -> Regex

renderFlags

renderFlags :: RegexFlags -> String

replace

replace :: Regex -> String -> String -> String

replace'

replace' :: Regex -> (String -> [String] -> String) -> String -> String

runRegexFlags

Unwrap RegexFlags type to the underlying record

runRegexFlags :: RegexFlags -> { unicode :: Boolean, sticky :: Boolean, multiline :: Boolean, ignoreCase :: Boolean, global :: Boolean }

search

search :: Regex -> String -> Number

source

source :: Regex -> String

split

split :: Regex -> String -> [String]

sticky

Flags where sticky : true and all others are false

sticky :: RegexFlags

test

test :: Regex -> String -> Boolean

unicode

Flags where unicode : true and all others are false

unicode :: RegexFlags

Module Data.String.Unsafe

Values

charAt

charAt :: Number -> String -> Char

charCodeAt

charCodeAt :: Number -> String -> Number

purescript-strings's People

Contributors

garyb avatar paf31 avatar jdegoes avatar nightra avatar davidchambers avatar michaelficarra avatar joneshf avatar

Watchers

Isaac Shapira avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.