Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p1GDqgoS023881 for ; Wed, 16 Feb 2011 14:52:43 +0100 Received: (qmail 12705 invoked by alias); 16 Feb 2011 13:52:37 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 16 Feb 2011 13:52:37 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx083) with SMTP; 16 Feb 2011 14:52:37 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p1GDodHV027596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Feb 2011 14:50:39 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p1GD1PEV018477; Wed, 16 Feb 2011 14:50:37 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1435730 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 16 Feb 2011 14:50:37 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p1GDob5d017945 for ; Wed, 16 Feb 2011 14:50:37 +0100 Received: from mail-iw0-f177.google.com (mail-iw0-f177.google.com [209.85.214.177]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p1GDoUrB017249 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL) for ; Wed, 16 Feb 2011 14:50:36 +0100 Received: by iwn38 with SMTP id 38so1558888iwn.22 for ; Wed, 16 Feb 2011 05:50:30 -0800 (PST) Received: by 10.231.15.132 with SMTP id k4mr482487iba.60.1297864230213; Wed, 16 Feb 2011 05:50:30 -0800 (PST) Received: from [10.0.1.108] (219-90-151-154.ip.adam.com.au [219.90.151.154]) by mx.google.com with ESMTPS id z4sm595657ibg.19.2011.02.16.05.50.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Feb 2011 05:50:29 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) References: <4028010D-1144-415D-A984-E3684A7E3EDE@gmail.com> <4D5B770A.2000401@morningstar2.co.uk> <20110216105124.GA5579@oberdiek.my-fqdn.de> <4D5BAE81.4020904@morningstar2.co.uk> X-Mailer: Apple Mail (2.1081) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id p1GDob5d017946 Message-ID: Date: Thu, 17 Feb 2011 00:20:23 +1030 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: Expandable versions of \uppercase, \MakeUppercase, \lowercase, \MakeLowercase To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7Y6oT1sPizBjJUAOds0oJBO/5TIz9C5741aj9GOJ bE70Q==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6605 On 16/02/2011, at 11:58 PM, Bruno Le Floch wrote: > As I now understand, the key point in all of this is that we can > detect spaces and braces expandably using delimited arguments, and we > can then be sure to act on one token at a time. Ah, I see: \long\gdef\UL_brace_check:nw#1#2#{% \UL_if_empty:nTF{#2}% {\UL_brace_yes:nn{#1}}% {\UL_space_check:nw{#1}#2}% } This is clever. Has anyone seen this done before? Are there any downsides? If it's as good as it seems then it allows all sorts of expandable things, such as optional argument parsing and expandable nested mapping. Thanks! -- Will