Get word with special symbol

Help
kokobobo
2011-04-27
2013-05-30
  • kokobobo
    kokobobo
    2011-04-27

    I am trying to get word on cursor , and i found GetWordAtRowCol() and WordAtCursor

    But when i try string such like  "W1.2"  or   "A@B" , the result  will be  "W1"  and "A"

    Could anyone tell me how to get the whole word?

     
  • Bas Schouten
    Bas Schouten
    2011-04-27

    WordAtCursor uses period and At-sign as word boundaries, unless there is a activated Highlighter that specifies otherwise (see line 10390 in SynEdit.pas)

    GetWordAtRowCol only looks for the first non-identChars, which are all non-printable characters by default, or Space, numbers and letters when a highlighter is specified (see line 10360 in SynEdit.Pas)