Deleted /n in Env.getClipboard()

Asked by palazzolo on 2017-04-27

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
palazzolo
Solved:
2017-04-27
Last query:
2017-04-27
Last reply:
2017-04-27
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 ;-)

palazzolo (vpasikuli) said : #2

Thanks. You are reason this is Python knowledge