purescript-0.13.0: tests/purs/publish/basic-example/output/Data.String.CodePoints/docs.json
{"reExports":[],"name":"Data.String.CodePoints","comments":"These functions allow PureScript strings to be treated as if they were\nsequences of Unicode code points instead of their true underlying\nimplementation (sequences of UTF-16 code units). For nearly all uses of\nstrings, these functions should be preferred over the ones in\n`Data.String.CodeUnits`.\n","declarations":[{"children":[{"comments":null,"title":"eqCodePoint","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Eq"],"Eq"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[49,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[49,44]}},{"comments":null,"title":"ordCodePoint","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Ord"],"Ord"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[50,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[50,46]}},{"comments":null,"title":"showCodePoint","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Show"],"Show"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[52,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[53,84]}},{"comments":null,"title":"boundedCodePoint","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Bounded"],"Bounded"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[55,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[57,27]}},{"comments":null,"title":"enumCodePoint","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Enum"],"Enum"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[59,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[61,37]}},{"comments":null,"title":"boundedEnumCodePoint","info":{"declType":"instance","dependencies":[],"type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Enum"],"BoundedEnum"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[63,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[68,26]}}],"comments":"CodePoint is an Int bounded between 0 and 0x10FFFF, corresponding to\nUnicode code points.\n","title":"CodePoint","info":{"declType":"data","dataDeclType":"newtype","typeArguments":[]},"sourceSpan":{"start":[47,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[47,34]}},{"children":[],"comments":"Creates a CodePoint from a given Char.\n\n```purescript\n>>> codePointFromChar 'B'\nCodePoint 0x42 -- represents 'B'\n```\n\n","title":"codePointFromChar","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Char"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}},"sourceSpan":{"start":[77,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[77,39]}},{"children":[],"comments":"Creates a string containing just the given code point. Operates in\nconstant space and time.\n\n```purescript\n>>> map singleton (codePointFromInt 0x1D400)\nJust \"π\"\n```\n\n","title":"singleton","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}},"sourceSpan":{"start":[88,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[88,33]}},{"children":[],"comments":"Creates a string from an array of code points. Operates in space and time\nlinear to the length of the array.\n\n```purescript\n>>> codePointArray = toCodePointArray \"c π\"\n>>> codePointArray\n[CodePoint 0x63, CodePoint 0x20, CodePoint 0x1D400]\n>>> fromCodePointArray codePointArray\n\"c π\"\n```\n\n","title":"fromCodePointArray","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Array"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}},"sourceSpan":{"start":[114,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[114,48]}},{"children":[],"comments":"Creates an array of code points from a string. Operates in space and time\nlinear to the length of the string.\n\n```purescript\n>>> codePointArray = toCodePointArray \"b ππ\"\n>>> codePointArray\n[CodePoint 0x62, CodePoint 0x20, CodePoint 0x1D400, CodePoint 0x1D400]\n>>> map singleton codePointArray\n[\"b\", \" \", \"π\", \"π\"]\n```\n\n","title":"toCodePointArray","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Array"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}]}},"sourceSpan":{"start":[133,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[133,46]}},{"children":[],"comments":"Returns the first code point of the string after dropping the given number\nof code points from the beginning, if there is such a code point. Operates\nin constant space and in time linear to the given index.\n\n```purescript\n>>> codePointAt 1 \"ππππ\"\nJust (CodePoint 0x1D400) -- represents \"π\"\n-- compare to Data.String:\n>>> charAt 1 \"ππππ\"\nJust 'οΏ½'\n```\n\n","title":"codePointAt","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]}]}]}},"sourceSpan":{"start":[160,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[160,48]}},{"children":[],"comments":"Returns a record with the first code point and the remaining code points\nof the string. Returns Nothing if the string is empty. Operates in\nconstant space and time.\n\n```purescript\n>>> uncons \"ππ c π\"\nJust { head: CodePoint 0x1D400, tail: \"π c π\" }\n>>> uncons \"\"\nNothing\n```\n\n","title":"uncons","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Record"]},{"annotation":[],"tag":"RCons","contents":["head",{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]},{"annotation":[],"tag":"RCons","contents":["tail",{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]},{"annotation":[],"tag":"REmpty"}]}]}]}]}]}},"sourceSpan":{"start":[191,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[191,64]}},{"children":[],"comments":"Returns the number of code points in the string. Operates in constant\nspace and in time linear to the length of the string.\n\n```purescript\n>>> length \"b ππ c π\"\n8\n-- compare to Data.String:\n>>> length \"b ππ c π\"\n11\n```\n\n","title":"length","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]}},"sourceSpan":{"start":[215,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[215,24]}},{"children":[],"comments":"Returns the number of code points in the leading sequence of code points\nwhich all match the given predicate. Operates in constant space and in\ntime linear to the length of the string.\n\n```purescript\n>>> countPrefix (\\c -> codePointToInt c == 0x1D400) \"ππ b c π\"\n2\n```\n\n","title":"countPrefix","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Boolean"]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]}]}},"sourceSpan":{"start":[227,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[227,55]}},{"children":[],"comments":"Returns the number of code points preceding the first match of the given\npattern in the string. Returns Nothing when no matches are found.\n\n```purescript\n>>> indexOf (Pattern \"π\") \"b ππ c π\"\nJust 2\n>>> indexOf (Pattern \"o\") \"b ππ c π\"\nNothing\n```\n\n","title":"indexOf","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","Pattern"],"Pattern"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]}]}]}},"sourceSpan":{"start":[255,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[255,42]}},{"children":[],"comments":"Returns the number of code points preceding the first match of the given\npattern in the string. Pattern matches preceding the given index will be\nignored. Returns Nothing when no matches are found.\n\n```purescript\n>>> indexOf' (Pattern \"π\") 4 \"b ππ c π\"\nJust 7\n>>> indexOf' (Pattern \"o\") 4 \"b ππ c π\"\nNothing\n```\n\n","title":"indexOf'","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","Pattern"],"Pattern"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]}]}]}]}},"sourceSpan":{"start":[269,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[269,50]}},{"children":[],"comments":"Returns the number of code points preceding the last match of the given\npattern in the string. Returns Nothing when no matches are found.\n\n```purescript\n>>> lastIndexOf (Pattern \"π\") \"b ππ c π\"\nJust 7\n>>> lastIndexOf (Pattern \"o\") \"b ππ c π\"\nNothing\n```\n\n","title":"lastIndexOf","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","Pattern"],"Pattern"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]}]}]}},"sourceSpan":{"start":[284,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[284,46]}},{"children":[],"comments":"Returns the number of code points preceding the first match of the given\npattern in the string. Pattern matches following the given index will be\nignored. Returns Nothing when no matches are found.\n\n```purescript\n>>> lastIndexOf' (Pattern \"π\") 5 \"b ππ c π\"\nJust 3\n>>> lastIndexOf' (Pattern \"o\") 5 \"b ππ c π\"\nNothing\n```\n\n","title":"lastIndexOf'","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","Pattern"],"Pattern"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Data","Maybe"],"Maybe"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]}]}]}]}},"sourceSpan":{"start":[298,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[298,54]}},{"children":[],"comments":"Returns a string containing the given number of code points from the\nbeginning of the given string. If the string does not have that many code\npoints, returns the empty string. Operates in constant space and in time\nlinear to the given number.\n\n```purescript\n>>> take 3 \"b ππ c π\"\n\"b π\"\n-- compare to Data.String:\n>>> take 3 \"b ππ c π\"\n\"b οΏ½\"\n```\n\n","title":"take","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}]}},"sourceSpan":{"start":[316,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[316,32]}},{"children":[],"comments":"Returns a string containing the leading sequence of code points which all\nmatch the given predicate from the string. Operates in constant space and\nin time linear to the length of the string.\n\n```purescript\n>>> takeWhile (\\c -> codePointToInt c == 0x1D400) \"ππ b c π\"\n\"ππ\"\n```\n\n","title":"takeWhile","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Boolean"]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}]}},"sourceSpan":{"start":[336,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[336,56]}},{"children":[],"comments":"Drops the given number of code points from the beginning of the string. If\nthe string does not have that many code points, returns the empty string.\nOperates in constant space and in time linear to the given number.\n\n```purescript\n>>> drop 5 \"ππ b c\"\n\"c\"\n-- compared to Data.String:\n>>> drop 5 \"ππ b c\"\n\"b c\" -- because \"π\" occupies 2 code units\n```\n\n","title":"drop","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}]}},"sourceSpan":{"start":[351,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[351,32]}},{"children":[],"comments":"Drops the leading sequence of code points which all match the given\npredicate from the string. Operates in constant space and in time linear\nto the length of the string.\n\n```purescript\n>>> dropWhile (\\c -> codePointToInt c == 0x1D400) \"ππ b c π\"\n\" b c π\"\n```\n\n","title":"dropWhile","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"ParensInType","contents":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Data","String","CodePoints"],"CodePoint"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Boolean"]}]}}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]}]}},"sourceSpan":{"start":[363,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[363,56]}},{"children":[],"comments":"Splits a string into two substrings, where `before` contains the code\npoints up to (but not including) the given index, and `after` contains the\nrest of the string, from that index on.\n\n```purescript\n>>> splitAt 3 \"b ππ c π\"\nJust { before: \"b π\", after: \"π c π\" }\n```\n\nThus the length of `(splitAt i s).before` will equal either `i` or\n`length s`, if that is shorter. (Or if `i` is negative the length will be\n0.)\n\nIn code:\n```purescript\nlength (splitAt i s).before == min (max i 0) (length s)\n(splitAt i s).before <> (splitAt i s).after == s\nsplitAt i s == {before: take i s, after: drop i s}\n```\n","title":"splitAt","info":{"declType":"value","type":{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Int"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Record"]},{"annotation":[],"tag":"RCons","contents":["before",{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]},{"annotation":[],"tag":"RCons","contents":["after",{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]},{"annotation":[],"tag":"REmpty"}]}]}]}]}]}},"sourceSpan":{"start":[385,1],"name":"../../../support/bower_components/purescript-strings/src/Data/String/CodePoints.purs","end":[385,66]}}]}