For instance, for 'wert34sdcv', extract rightmost 4 characters ('sdcv'). Yes?
Let ss be a string of format Aw, like A10, for instance.
Compute nchar=char.length(ss). Is the number of nonblank characters, excluding embedded blanks.
You don't give examples but if ss is A10, nchar can vary between 0 and 10.
You want to extract the rightmost x characters. No details but I assume that if ss='qiop99 ' and x=4, you want to pull out 'op99'. But what do you do if ss='45'? Possible? Let's say No.
Compute nchar=char.length(ss).
String subss(Ax).
If (nchar ge x) subss=char.substr(ss,nchar-x+1,x).
Gene Maguin
-----Original Message-----
From: SPSSX(r) Discussion [mailto:
[hidden email]] On Behalf Of nuptse
Sent: Thursday, February 25, 2016 10:31 AM
To:
[hidden email]
Subject: Re: Extracting Part of a string
I mean to say x number of characters ....
Thanks
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Extracting-Part-of-a-string-tp5731613p5731614.htmlSent from the SPSSX Discussion mailing list archive at Nabble.com.
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD