Is this valid code?
function escape_html(s)
{
return s
.replaceAll("&", "&") /* always do first, rest can be in any order */
.replaceAll("\"", """)
.replaceAll("<", "<")
.replaceAll(">", ">")
.replaceAll("\t", "	")
.replaceAll("\n", " ")
} /*escape_html*/
But I have my doubts.
So method chaining might not always satisfied the
same expectations about being a more "functional" approach.
On Thu, 22 Feb 2024 11:37:52 +0100, Mild Shock wrote:
But I have my doubts.
Show us your non-method-chained-style version, then.
Lawrence D'Oliveiro schrieb:
On Thu, 22 Feb 2024 11:37:52 +0100, Mild Shock wrote:Guido von Rossum suggest to not always use method chaining:
But I have my doubts.
Show us your non-method-chained-style version, then.
On Fri, 23 Feb 2024 00:49:08 +0100, Mild Shock wrote:<snip>
Lawrence D'Oliveiro schrieb:
On Thu, 22 Feb 2024 11:37:52 +0100, Mild Shock wrote:
Guido von Rossum suggest to not always use method chaining:
Which is not really answering my question, is it?
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,104 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 492386:43:34 |
| Calls: | 14,150 |
| Calls today: | 1 |
| Files: | 186,281 |
| D/L today: |
2,247 files (850M bytes) |
| Messages: | 2,501,141 |