how do I chop of characters at the end of a line...

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Bryce C
Date:  
Subject: how do I chop of characters at the end of a line...
--=-IHmAZNIvqq27qx8H2H8y
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

In PHP, $a=3Dsubstr($a, 0, -4);. Hope that can help. At least substr().

On Mon, 2003-03-03 at 21:40, Kevin Brown wrote:
> > I want to take a variable say a=3D"string.txt" and chop off the last =

4
> > characters so I can make variable b equal to just "string"
>=20
> What programming language?
>=20
> You can use cut in a shell script, or treat it as an array and shorten th=

e array=20
> length by 4 spots, etc...
>=20
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

--=20
Bryce C <>
CoBryce Communications

--=-IHmAZNIvqq27qx8H2H8y
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA+ZC+H/wbq/C6yyPcRArKrAJ9NtukIDHE/6RsuMqkFSXyiBOlD7ACgtYMj
VP+u7/pKnGkzn9aC09LJ8cw=
=sg2U
-----END PGP SIGNATURE-----

--=-IHmAZNIvqq27qx8H2H8y--