From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Enable utf8->string to take a range Date: Fri, 21 Jan 2022 17:54:57 +0100 Message-ID: <558b3f4868129e409eef35f69cc1cf1b933011d7.camel@telenet.be> References: <87h79x6abc.fsf@vijaymarupudi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-tAg3Vc7TyO1IFxIy2p7e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20633"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.38.3-1 To: Vijay Marupudi , guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Jan 21 17:59:52 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAxGS-0005IF-BZ for guile-devel@m.gmane-mx.org; Fri, 21 Jan 2022 17:59:52 +0100 Original-Received: from localhost ([::1]:52352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAxGR-0004b9-Al for guile-devel@m.gmane-mx.org; Fri, 21 Jan 2022 11:59:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAxBv-0007Gx-Fk for guile-devel@gnu.org; Fri, 21 Jan 2022 11:55:11 -0500 Original-Received: from [2a02:1800:120:4::f00:14] (port=36680 helo=xavier.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAxBn-0003L1-2f for guile-devel@gnu.org; Fri, 21 Jan 2022 11:55:04 -0500 Original-Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id lUv02600Z4UW6Th01Uv0bt; Fri, 21 Jan 2022 17:55:00 +0100 In-Reply-To: <87h79x6abc.fsf@vijaymarupudi.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642784100; bh=pFSGcUiY9RgrJQPz3gFHhkXJWLJcJR2yd5ACGttSAy8=; h=Subject:From:To:Date:In-Reply-To:References; b=ERXTbZH3pjVqDHecwAJsMs8fatDcypDn6AUhQUIiVZLVhw66Zudk1JcCA4x/O445s H5GvuU571yuTSzMnaO7CF69ghHw6Vukp509ZQ+fkz/FASTEPvTSX6fPwY9409L3vIi JZzlvKj62q/rE8S8ZyNZosAP8iX2GjrIYVZeHH7jzmSEpVl47tbDEr4NZtVK4trw8T Koftg0PXJ7gWJWn25X5OQFqmTAXUukfoJcrOdZnQ97Kx2VeImPVEPcfDSgH9OMR2cO 4ItdtyWxST1j2bEkrkmlmeS/9+1JZDL/5DA33jo5BYZs6FzTdsK5jLRVez8iQdwvrs OLHpV6I7cXn0Q== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:14 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21055 Archived-At: --=-tAg3Vc7TyO1IFxIy2p7e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Vijay Marupudi schreef op do 20-01-2022 om 22:23 [-0500]: > +@deffn {Scheme Procedure} utf8->string utf [start [end]] > =C2=A0@deffnx {Scheme Procedure} utf16->string utf [endianness] > =C2=A0@deffnx {Scheme Procedure} utf32->string utf [endianness] > =C2=A0@deffnx {C Function} scm_utf8_to_string (utf) > +@deffnx {C Function} scm_utf8_to_string_range (utf, start, end) It would be nice to document if it's an open, closed or half- open/closed range. E.g. see the documentation of 'substring': -- Scheme Procedure: substring str start [end] -- C Function: scm_substring (str, start, end) Return a new string formed from the characters of STR beginning with index START (inclusive) and ending with index END (exclusive). STR must be a string, START and END must be exact integers satisfying: 0 <=3D START <=3D END <=3D =E2=80=98(string-length STR)=E2=80=99. The returned string shares storage with STR initially, but it is copied as soon as one of the two strings is modified. It seems a bit weird to support [start] and [end] for utf8->string but not for utf16->string and utf32->string. Greetings, Maxime.=20 --=-tAg3Vc7TyO1IFxIy2p7e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYerlYRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7id7AQDOQtwfm+1w+vwyRvuzi8kmv5PH 4yFOZg4acjbLDFuNugEAjAapu8JHoIOhlkC/l2wQTLh9xWWKVTV2L1f6QIfMnwo= =RRIZ -----END PGP SIGNATURE----- --=-tAg3Vc7TyO1IFxIy2p7e--