From: jsimomaa Date: Tue, 30 Jan 2018 09:13:05 +0000 (+0200) Subject: Adding getBytes for String in SCL X-Git-Tag: v1.43.0~136^2~614 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F1406%2F2;p=simantics%2Fplatform.git Adding getBytes for String in SCL refs #7732 Change-Id: Ic340712ffbbc6944c0b31e2420f6adfacce29eaf --- 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