Path: csiph.com!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail From: nobody@example.org (Scott) Newsgroups: comp.lang.java.programmer Subject: Re: Inclusive or exclusive array Date: Fri, 02 Aug 2019 17:51:58 GMT Organization: XMission http://xmission.com/ Message-ID: <5d44779f.3066731218@core> References: <87zhkvmqx8.fsf@munus.decebal.nl> <87v9vjmkkn.fsf@munus.decebal.nl> <40442ad6-ade1-41b3-98da-1a01b6d0b7c7@googlegroups.com> Injection-Info: news.xmission.com; posting-host="shell.xmission.com:2607:fa18:0:beef::4"; logging-data="27454"; mail-complaints-to="abuse@xmission.com" X-Newsreader: Forte Free Agent 1.21/32.243 Xref: csiph.com comp.lang.java.programmer:39063 On Thu, 1 Aug 2019 10:04:37 -0700 (PDT), Eric Douglas wrote: >On Thursday, August 1, 2019 at 11:19:55 AM UTC-4, Arne Vajh=C3=B8j wrote: >>=20 >> java.lang.String.substring() is one noticeable example of exclusive end. >>=20 >> It may be worth noting that .NET System.String.Substring(), >> C++ std::string::substr() and PHP substr() all chose length. >>=20 >> Arne > >substring is a fun animal. I'm used to start position, length from other l= >anguages then we get to java with start index, end index. What make it 'click' for me is when I realized that where other languages use {start,len}, Java convention uses {start,start+len}.