From a5e2f99430384fff580646a553b1e8ae27e07acd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 10 Feb 2021 19:04:18 -0400 Subject: Continuing with Lua --- lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lux-jvm/source') 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)])) -- cgit v1.2.3