first method

String first({
  1. String separator = "/",
})

Get the first string which is separated by separator.

Implementation

String first({String separator = "/"}) {
  return this?.split(separator).firstOrNull ?? "";
}