How to mold into a long quoted string?

Started by OneArb on 24-Oct-2023/15:37:11-7:00
Is there any reason on R3: >> path1: "123456789|123456789|123456789|123456789|123456789|123456789|" == {123456789|123456789|123456789|123456789|123456789|123456789|} >> path1: "123456789|123456789|123456789|123456789|123456789|" == "123456789|123456789|123456789|123456789|123456789|" How to transform the curly brackets into double quotes?
both quotes and curly braces are a sign of a string (http://www.rebol.com/r3/docs/datatypes/string.html) here is just the terminal output of rebol which does not change the data type. If you need to change the behavior when entering data in the rebol terminal, then most likely you will have to change the source code
I am looking to output a string, length > 50, surrounded by double-quotes to an environment variable. Just wondering what is the terse way of doing that.
double-quote: {"} export-string: rejoin [double-quote "your own long string here" double-quote]
a: "123456789 123456789 123456789 123456789 123456789 123456789" print rejoin [{"} a {"}] // ------------ or ----------------- prin {"} prin a print {"} can be try in http://rebol.scienceontheweb.net/
Or use ^" Print "^" 123...789 ^""
Would it make sense for to-local-file and clean-path to return quoted strings or at least have that option as paths with empty spaces require double quotes in Linux?
single or double quotes
No, the quotes are only in the MOLDed or PRINTed output, not in the internal STRING! that to-local-file and clean-path return.
When you say Linux requires quotes, that is only in the shell. You may still need unquoted paths for Linux API calls.
I'll add a little. If you need to work with variables in the shell, then you can use the "get-env" and "set-env" functions. Quotes may also be required if the path to the file has spaces, then in Linux you can do so without quotes by placing a slash (\) in front of the space localhost:~# mkdir "aaa bbb" localhost:~# cd aaa\ bbb/ localhost:~/aaa bbb#

Reply