Seite 1 von 1

[GELÖST] Stringfunktion unquote

Verfasst: 01 Okt 2012, 11:30
von tobias
Hi,

ich verstehe die Funktion unquote beim bearbeiten von Strings irgendwie nicht.

Ich habe in meiner Stringliste z.B. folgenden wert: "WINWORD.EXE"
mit unquote möchte ich die Anführungszeichen entfernen. Nun verstehe ich jedoch die Funktion nicht.

Ich dachte an:

Code: Alles auswählen

set $unquotedprocess$ = unquote($process$) 
oder an

Code: Alles auswählen

set $unquotedprocess$ = unquote(takestring(1,$process$) ) 
Laut Manual wird aber noch <quote-string> benötigt... was will der Winst da haben?


Gruß
Tobias

Re: Stringfunktion unquote

Verfasst: 01 Okt 2012, 12:41
von Thomas_H
Moinsens,

wenn ich die Anleitung lese verstehe ich das so:

gequoteter Text zum Beispiel: 'word'

Code: Alles auswählen

set $process$ = 'word'
set $unquotedprocess$ = unquote($process$, "'")  # aufgedröselt: " ' "
[code]

gequoteter Text zum Beispiel: "word"

[code]
set $process$ = "word"
set $unquotedprocess$ = unquote($process$, """) # aufgedröselt: " " "
[code]

gequoteter Text zum Beispiel: /word/ # ist ein blödes Beispiel, ich weiss... 

[code]
set $process$ = /word/
set $unquotedprocess$ = unquote($process$, "/") # aufgedröselt: " / "
[code]

oder auch:

gequoteter Text zum Beispiel: "/word/" # ist ein noch blödes Beispiel, ... 

[code]
set $process$ = "/word/"
set $unquotedprocess$ = unquote($process$, ""/") # aufgedröselt: " "/ "
set $unquotedprocess$ = unquote($unquotedprocess$, "/"") # aufgedröselt: " /" "
[code]


Gruß

Thomas_H

Re: Stringfunktion unquote

Verfasst: 01 Okt 2012, 14:05
von d.oertel
Hi,

mal in
http://download.uib.de/opsi4.0/testing/ ... tes-de.pdf
nach 'unquote' suchen, da gibt es auch Beispiele.

gruß
d.oertel

Re: Stringfunktion unquote

Verfasst: 01 Okt 2012, 14:52
von tobias
Danke das hat geholfen :)


Gruß
Tobias