diff --git a/jolt-core/src/main/java/com/bazaarvoice/jolt/modifier/function/Strings.java b/jolt-core/src/main/java/com/bazaarvoice/jolt/modifier/function/Strings.java index 3af56224..73a48d31 100644 --- a/jolt-core/src/main/java/com/bazaarvoice/jolt/modifier/function/Strings.java +++ b/jolt-core/src/main/java/com/bazaarvoice/jolt/modifier/function/Strings.java @@ -101,8 +101,8 @@ protected Optional applyList(List argList) { // If we get here, then all these casts should work. String tuna = (String) argList.get(0); - int start = (Integer) argList.get(1); - int end = (Integer) argList.get(2); + int start = tuna.offsetByCodePoints(0, (Integer) argList.get(1)); + int end = tuna.offsetByCodePoints(0, (Integer) argList.get(2)); // do start and end make sense? if ( start >= end || start < 0 || end < 1 || end > tuna.length() ) {