From af2c742f531e6d998c69286ad162b60b42c842c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 31 May 2019 15:27:53 +0200 Subject: Fix and expose String::strip_escapes(), use it in LineEdit paste Supersedes #27736. --- doc/classes/LineEdit.xml | 1 + doc/classes/String.xml | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'doc/classes') diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index bb180b591d..184987d2dd 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -166,6 +166,7 @@ Pastes the clipboard text over the selected text (or at the cursor's position). + Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes]. Erases the whole [LineEdit] text. diff --git a/doc/classes/String.xml b/doc/classes/String.xml index e06f0738b8..5ea78c6f1c 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -741,7 +741,14 @@ - Returns a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. + Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. + + + + + + + Returns a copy of the string stripped of any escape character. These include all non-printable control characters of the first page of the ASCII table (< 32), such as tabulation ([code]\t[/code] in C) and newline ([code]\n[/code] and [code]\r[/code]) characters, but not spaces. -- cgit v1.2.3