indexOfPart method

int indexOfPart(
  1. SingleStringMathTex? part
)

Implementation

int indexOfPart(SingleStringMathTex? part) {
  var splitSelf = split();

  if (part == null) {
    throw 'Trying to get index of part not in MathTex';
  }

  var index = splitSelf.indexOf(part);

  if (index < 0) {
    throw 'Trying to get index of part not in MathTex';
  }

  return index;
}