formal languages – Is string spliting formally defined when the string delimiter is an empty string?

Depending on the API/language you use, splitting the string "ABCD" using "" as a delimiter gets you:

  • ["A", "B", "C", "D"] in Java, Javascript, and Go
  • ["", "A", "B", "C", "D", ""] in Rust
  • ["ABCD"] in C#
  • Fails with an Exception in Python3

From the perspective of formal language design, what is the correct result of such an operation? Is it defined?

Disclosure: This question was posted at stack overflow but was closed as opinion-based. I was directed to post my question here instead.