public static String stripQuotes(String string){
  if (string.startsWith("\"\"\"")) {
    return string.length() <= 3 ? "" : string.substring(3,endTrimIndex(string,'"',3));
  }
  if (string.startsWith("'''")) {
    return string.length() <= 3 ? "" : string.substring(3,endTrimIndex(string,'\'',3));
  }
  if (string.startsWith("\"")) {
    return string.substring(1,endTrimIndex(string,'"',1));
  }
  if (string.startsWith("'")) {
    return string.substring(1,endTrimIndex(string,'\'',1));
  }
  return string;
}

public static String stripQuotes ( String string ) { if ( string . startsWith ( "\"\"\"" ) ) { return string . length ( ) <= 3 ? "" : string . substring ( 3 , endTrimIndex ( string , '"' , 3 ) ) ; } if ( string . startsWith ( "'''" ) ) { return string . length ( ) <= 3 ? "" : string . substring ( 3 , endTrimIndex ( string , '\'' , 3 ) ) ; } if ( string . startsWith ( "\"" ) ) { return string . substring ( 1 , endTrimIndex ( string , '"' , 1 ) ) ; } if ( string . startsWith ( "'" ) ) { return string . substring ( 1 , endTrimIndex ( string , '\'' , 1 ) ) ; } return string ; }
removes the leading and trailing quotes . naive implementation intended for resolving references ( in which case escaped characters , raw strings , etc . are unlikely ) .
