aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source
diff options
context:
space:
mode:
authorEduardo Julian2021-02-10 19:04:18 -0400
committerEduardo Julian2021-02-10 19:04:18 -0400
commita5e2f99430384fff580646a553b1e8ae27e07acd (patch)
tree185681c6b41cec359a20cbb094e33048cbec921b /lux-jvm/source
parentd99c47989a1047cd24019fd5ce434e701b5d3519 (diff)
Continuing with Lua
Diffstat (limited to '')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux8
1 files changed, 5 insertions, 3 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
index fd86253d5..39934dbb8 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
@@ -255,11 +255,13 @@
rightI ..check_stringI
(_.INVOKEVIRTUAL $String "concat" (type.method [(list $String) $String (list)]))))
-(def: (text::clip [startI endI subjectI])
+(def: (text::clip [offsetI lengthI subjectI])
(Trinary Inst)
(|>> subjectI ..check_stringI
- startI jvm_intI
- endI jvm_intI
+ offsetI jvm_intI
+ _.DUP
+ lengthI jvm_intI
+ _.IADD
(_.INVOKEVIRTUAL $String "substring" (type.method [(list type.int type.int) $String (list)]))))
(def: index_method (type.method [(list $String type.int) type.int (list)]))