From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] * lisp/subr.el (string-suffix-p): New function. Date: Fri, 22 Nov 2013 09:07:04 -0500 Message-ID: References: <96EB3F8805134461A3BA58983F643449@gmail.com> <8738mo4x69.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385129261 10243 80.91.229.3 (22 Nov 2013 14:07:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2013 14:07:41 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , emacs-devel To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 22 15:07:46 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VjrOF-0004hX-6s for ged-emacs-devel@m.gmane.org; Fri, 22 Nov 2013 15:07:23 +0100 Original-Received: from localhost ([::1]:39000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjrOE-0006mC-Iy for ged-emacs-devel@m.gmane.org; Fri, 22 Nov 2013 09:07:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjrO5-0006l9-Fm for emacs-devel@gnu.org; Fri, 22 Nov 2013 09:07:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjrNy-0002L3-6K for emacs-devel@gnu.org; Fri, 22 Nov 2013 09:07:13 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:21811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjrNy-0002Kw-1n for emacs-devel@gnu.org; Fri, 22 Nov 2013 09:07:06 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KWN/2dsb2JhbAA7Cb8OF3OCHgEBBAFWIwULCzQSFBgNJIgeBsEtjRaDdAOIYZwZgV6DFQ X-IPAS-Result: Av4EABK/CFHO+KWN/2dsb2JhbAA7Cb8OF3OCHgEBBAFWIwULCzQSFBgNJIgeBsEtjRaDdAOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40081090" Original-Received: from 206-248-165-141.dsl.teksavvy.com (HELO pastel.home) ([206.248.165.141]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 Nov 2013 09:07:05 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DB491600ED; Fri, 22 Nov 2013 09:07:04 -0500 (EST) In-Reply-To: (Bozhidar Batsov's message of "Fri, 22 Nov 2013 12:41:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165558 Archived-At: > You can't really favour this: > (mapconcat #'identity (list s1 s2 s3) separator) > over: > (string-join separator s1 s2 s3) I'm not sure if one is clearly superior to the other. But having one, there's not much motivation to add the other. But `string-join' can definitely be added to the new helpers.el. >> > * string-trim/string-trim-left/string-trim-right >> Perhaps. These also would be good candidates for helpers.el. >> > * string-chop I can't remember using something similar to string-chop. In Perl, this was handy because it's frequent to receive "a line with a terminating LF", but in Emacs it doesn't seem to happen nearly as often. Stefan