Skip to content

Commit 49d6411

Browse files
committed
Add charCodeAt
1 parent 05cb937 commit 49d6411

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Data/String.purs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ foreign import charAt
77
\ };\
88
\}" :: Number -> String -> String
99

10+
foreign import charCodeAt
11+
"function charCodeAt(i) {\
12+
\ return function(s) {\
13+
\ return s.charCodeAt(i); \
14+
\ };\
15+
\}" :: Number -> String -> Number
16+
1017
foreign import fromCharCode
1118
"function fromCharCode(n) {\
1219
\ return String.fromCharCode(n);\

0 commit comments

Comments
 (0)