From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: daniel@bigwalter.net (Daniel Jensen) Newsgroups: gmane.emacs.help Subject: Re: a function for string splitting Date: Tue, 26 Nov 2002 16:56:36 +0100 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <86u1i4pbnv.fsf@bigwalter.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1038326423 12876 80.91.224.249 (26 Nov 2002 16:00:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 26 Nov 2002 16:00:23 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Gi8H-0003L4-00 for ; Tue, 26 Nov 2002 17:00:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18Gi9S-0000xA-00; Tue, 26 Nov 2002 11:01:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!as16-3-5.ld.bonet.SE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: as16-3-5.ld.bonet.se (217.215.193.155) Original-X-Trace: fu-berlin.de 1038326197 23764322 217.215.193.155 (16 [147297]) User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu) Cancel-Lock: sha1:gnn1Bro49FELLOJ8YuvfOfLKfT4= Original-Xref: shelby.stanford.edu gnu.emacs.help:107487 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4038 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4038 "Luis O. Silva" writes: > I'm writing a function for translating dates in the form of a > string into Spanish and Russian. For example, you have: > > "Thu, 21 Nov 2002 16:05:50 -0600 (CST)" You might want to use format-time-string instead. To get the above date form but with localized month and day names, you would use: (format-time-string "%a, %e %b %Y %H:%M:%S %z (%Z)") > Within my function I used a `let' expression of the form: > > (let ((day (substring "Thu, 21 Nov 2002 16:05:50 -0600 (CST)" 0 3)) > (month (substring "Thu, 21 Nov 2002 16:05:50 -0600 (CST)" 8 11))) > ...) > > All works fine provided that there isn't any date with > one-digit day, i. e., "Fri, 8 Nov 2002 11:56:37 -0500 (CST)" > > My question is what function I could use for correctly > splitting the string. There is actually a split-string function. -- Daniel Jensen > (format (concat "mailto:" "%s@%s.%s") "daniel" "bigwalter" "net")