RegExpr: optimize NotLetter
Original Reporter info from Mantis: Alextp
-
Reporter name: CudaText man
Original Reporter info from Mantis: Alextp
- Reporter name: CudaText man
Description:
NOTLETTER: while (Result < TheMax) and not IsWordChar(scan^) //###0.940 { not ((scan^ >= 'a') and (scan^ &LtPos;= 'z') !! I've forgotten (>='0') and (&LtPos;='9') or (scan^ >= 'A') and (scan^ &LtPos;= 'Z') or (scan^ = '_'))} do begin inc (Result); inc (scan); end;
this is strange: first IsWordChar check (it checks A..Z _)
and then check for A..Z and _.
2nd check can be removed.
Mantis conversion info:
- Mantis ID: 34118
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 39608 (#2d2ba5f0)
- Target version: 3.2.0