Front page | perl.perl6.internals |
Postings from July 2002
Re: [PATCH] 3-arg chopn
Thread Previous
From:
Josh Wilmes
Date:
July 2, 2002 12:51
Subject:
Re: [PATCH] 3-arg chopn
Message ID:
200207021950.g62JoVN9023115@galactic.hitchhiker.org
Can you add a test as well?
--Josh
At 14:37 on 07/02/2002 CDT, brian wheeler <bdwheele@indiana.edu> wrote:
> I saw this was a TODO item in core.ops.
>
> Brian
>
>
>
> --- core.ops 1 Jul 2002 17:18:04 -0000 1.176
> +++ core.ops 2 Jul 2002 19:41:44 -0000
> @@ -2074,9 +2074,9 @@
>
> =item B<chopn>(inout STR, in INT)
>
> -Remove $2 characters from the end of the string in $1.
> +=item B<chopn>(out STR, in STR, in INT)
>
> -TODO: Create a three-argument version of this? Don't force in-place modifica
tion.'
> +Remove $2 characters from the end of the string in $1.
>
> =cut
>
> @@ -2085,6 +2085,11 @@
> goto NEXT();
> }
>
> +inline op chopn(out STR, in STR, in INT) {
> + $1 = string_copy(interpreter, $2);
> + (void)string_chopn($1,$3);
> + goto NEXT();
> +}
>
> ########################################
>
Thread Previous