%dw 2.0
import substringBeforeLast from dw::core::Strings
---
{
  "a": substringBeforeLast(null, "'"),
  "b": substringBeforeLast("", "-"),
  "c": substringBeforeLast("abc", "b"),
  "d": substringBeforeLast("abcba", "b"),
  "e": substringBeforeLast("abc", "d"),
  "f": substringBeforeLast("abc", "")
}