[4874] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: Substr command in C

daemon@ATHENA.MIT.EDU (Steve Austin)
Tue Oct 13 15:18:33 1998

Date: 	Tue, 13 Oct 1998 16:13:43 +0100 (BST)
From: Steve Austin <steve@edensfld.demon.co.uk>
To: Adolf Ahmad MS <adolf@ratelindo.co.id>
cc: "'linux-scsi@vger.rutgers.edu'" <linux-scsi@vger.rutgers.edu>
In-Reply-To: <B1E0C61741C3D111A8E7006097C3B5A486BA40@WBMAIL>

On Tue, 13 Oct 1998, Adolf Ahmad MS wrote:

> Dear All,
> 
> Would you like to help me ?
> On PERL Language we can do substring command e.g "$b = substr($a,2,3)" that
> mean 'if the value of $a="uvwxyz" we will get the value of $b="wxy" '. I'm
> confusing to do that on C/C++, how to do that ?

We aren't the best people to ask, being a special interest group who only
look at SCSI drivers, hardware &c. for the Linux operating system. 

You need to understand the handling of character arrays and pointers in C
and C++ before attempting this; the languages don't provide support for
naive handling of character strings as unitary objects that can chucked
about willy-nilly directly, although standard string handling functions
(not including substr) are provided.  

--------------------------------------------------------------------
Steve Austin                              steve@edensfld.demon.co.uk



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post