🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #845

WANTED: macro which extracts first char of its argument - possible?

#845
From: Christian Schaepper
Date: Wed, 05 Aug 1992 13:33
16 lines
1145 bytes
Dear TeXnicians,

is it possible to write a macro which extracts the first character of
its argument (such that, for example, `\firstchar{abc}' yields `a') ?

The intended usage is as follows: \def\myinput#1{\input \firstchar{#1}/#1}
(\myinput{file} should really input f/file).

	Regards
	 -Christian Sch\"apper

-- 
+-----------------------------------------------------------------------------+
| Christian Schaepper, Zurich, Switzerland      schaeppe@nessie.cs.id.ethz.ch |
|                                 DECnet: UZPH7::SCHAEPPER (57560::SCHAEPPER) |
+-----------------------------------------------------------------------------+
Technical Details
Message-ID: <1992Aug5.133331.9379@bernina.ethz.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!wupost!darwin.sura.net!Sirius.dfn.de!chx400!bernina!schaeppe

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!wupost!darwin.sura.net!Sirius.dfn.de!chx400!bernina!schaeppe
From: schaeppe@nessie.cs.id.ethz.ch (Christian Schaepper)
Subject: WANTED: macro which extracts first char of its argument - possible?
Message-ID: <1992Aug5.133331.9379@bernina.ethz.ch>
Sender: news@bernina.ethz.ch (USENET News System)
Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
Date: Wed, 5 Aug 1992 13:33:31 GMT
Lines: 16