Deleted /n in Env.getClipboard()

Asked by palazzolo

Hello,

I am French. Sorry.

I do a copy from a cell of excel to search for a value "test".
When I look in the clipboard [Env.getClipboard()] it returns "test \ n"

Is there a function to remove the character \ n ?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
palazzolo
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

someText = Env.getClipboard().strip()

the function strip removes whitespace characters on both ends of the string.

there are also lstrip() (left side only - begin) and rstrip() (right side only - end)

BTW: this is Python knowledge ;-)

Revision history for this message
palazzolo (vpasikuli) said :
#2

Thanks. You are reason this is Python knowledge