Convert all arguments to strings and concatenate.
Usage examples:
number=2; echo ("This is ",number,3," and that's it."); echo (str("This is ",number,3," and that's it."));
Results:
ECHO: "This is ", 2, 3, " and that's it." ECHO: "This is 23 and that's it."
[Note: Requires version 2015.03]
Convert numbers to a string containing character with the corresponding code. OpenSCAD uses Unicode, so the number is interpreted as Unicode code point. Numbers outside the valid code point range produce an empty string.
Parameters
Examples
echo(chr(65), chr(97)); // ECHO: "A", "a" echo(chr(65, 97)); // ECHO: "Aa" echo(chr([66, 98])); // ECHO: "Bb" echo(chr([97 : 2 : 102])); // ECHO: "ace" echo(chr(-3)); // ECHO: "" echo(chr(9786), chr(9788)); // ECHO: "☺", "☼" echo(len(chr(9788))); // ECHO: 1
Note: When used with echo() the output to the console for character codes greater than 127 is platform dependent.
[Note: Requires version 2019.05]
Convert a character to a number representing the Unicode code point. If the parameter is not a string, the ord()
returns undef
.
Parameters
Examples
echo(ord("a")); // ECHO: 97 echo(ord("BCD")); // ECHO: 66 echo([for (c = "Hello! 🙂") ord(c)]); // ECHO: [72, 101, 108, 108, 111, 33, 32, 128578]
search() for text searching.