message: Find first and last character of [ & ] before substring
diff: @@ -457,11 +457,17 @@ function addLaunchJsonIfNecessary(generator: AssetGenerator, operations: Operati
  let launchJson: string = generator.createLaunchJson(isWebProject);
  if (existingLaunchConfigs) {
  - launchJson = launchJson.substring(0, launchJson.length-1);
  let existingLaunchConfigsString = JSON.stringify(existingLaunchConfigs, null, ' ');
  - existingLaunchConfigsString = existingLaunchConfigsString.substring(1, existingLaunchConfigsString.length-1);
  + const lastBracket = launchJson.lastIndexOf(']');
  + const lastBracketInExistingConfig = existingLaunchConfigsString.lastIndexOf(']');
  + const firstBracketInExistingConfig = existingLaunchConfigsString.lastIndexOf('[');
  +
  + if (lastBracket !== -1 && lastBracketInExistingConfig !== -1 && firstBracketInExistingConfig !== -1) {
  + launchJson = launchJson.substring(0, lastBracket);
  + existingLaunchConfigsString = existingLaunchConfigsString.substring(firstBracketInExistingConfig, lastBracketInExistingConfig);
  launchJson = `${launchJson},${existingLaunchConfigsString}]`;
  }
  + }
  const configurationsMassaged: string = indentJsonString(launchJson);
  const launchJsonText = `
  