[Cuis-dev] printString on String
Jon Raiford
raiford at labware.com
Thu Dec 12 04:03:10 PST 2024
Yes, printString answers the string enclosed in single quotes and it even doubles up any single quotes inside the string. This is especially useful when building database queries to prevent sql injection attacks.
Jon
From: Cuis-dev <cuis-dev-bounces at lists.cuis.st> on behalf of Hilaire Fernandes via Cuis-dev <cuis-dev at lists.cuis.st>
Date: Thursday, December 12, 2024 at 5:53 AM
To: Discussion of Cuis Smalltalk <cuis-dev at lists.cuis.st>
Cc: Hilaire Fernandes <hfern at free.fr>
Subject: [Cuis-dev] printString on String
Hi,
Is it the expected behavior to have quoted included when asking printString to a String ?
'Toto' printString
=> '''Toto''' .
Using #asString solves this issue but not exactly the same semantic
--
http://mamot.fr/@drgeo<http://mamot.fr/@drgeo>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241212/7452da7f/attachment.htm>
More information about the Cuis-dev
mailing list