]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Prelude.scl
Adding getBytes for String in SCL
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Prelude.scl
index eb8026de910e15f2b8900c2e0fce6a6d6a0d0d6e..bb6452429b39141a10a45ae19dbf4ad0736d0745 100644 (file)
@@ -1421,6 +1421,11 @@ importJava "java.lang.String" where
     "Creates a string from a vector of characters."
     @JavaName "<init>"
     string :: Vector Character -> String
+    
+    getBytes :: String -> String -> ByteArray
+
+getBytesUTF8 :: String -> ByteArray
+getBytesUTF8 str = getBytes str "UTF-8"
 
 instance Ord String where
     compare = compareString