-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
if ( pos == UNKNOWN )
{
pos = GetBegPos( METHOD_IND ) + myMeth.Length();
- if ( pos < 1 )
+ if ( pos < 1 && Length() >= 4 )
pos = myString.Location( "(", 4, Length() ); // 4 = strlen("b.c(")
}
return pos;
}
theStartPos = beg;
//cout << theString << " ---- " << beg << " - " << end << endl;
+ if ( end > theString.Length() )
+ {
+ theStartPos = EMPTY;
+ return theEmptyString;
+ }
return theString.SubString( beg, end );
}