From 8568b9f55095fcab15eb28d16bcf67b64844eca3 Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Tue, 30 Jan 2018 11:13:05 +0200 Subject: [PATCH] Adding getBytes for String in SCL refs #7732 Change-Id: Ic340712ffbbc6944c0b31e2420f6adfacce29eaf --- bundles/org.simantics.scl.runtime/scl/Prelude.scl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index eb8026de9..bb6452429 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -1421,6 +1421,11 @@ importJava "java.lang.String" where "Creates a string from a vector of characters." @JavaName "" string :: Vector Character -> String + + getBytes :: String -> String -> ByteArray + +getBytesUTF8 :: String -> ByteArray +getBytesUTF8 str = getBytes str "UTF-8" instance Ord String where compare = compareString -- 2.43.2