charAt for String in Ebasic?

209 views
Skip to first unread message

Junho Oh

unread,
Nov 19, 2013, 5:32:57 PM11/19/13
to e-p...@googlegroups.com
Hello,
I am new to Eprime and Ebasic and I have been fiddling around with string manipulation. 
Is there no way to get the index of a particular character in a string (eg. charAt in Java)? And is there no way to get the substring either?
Thank you very much for your help!
-Junho

Paul Groot

unread,
Nov 19, 2013, 5:47:51 PM11/19/13
to e-p...@googlegroups.com
Check the E-Basic manual for InStr() and Mid().

Paul


--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/97ea622f-1d7e-4a93-9c56-b2c34392531a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

David McFarlane

unread,
Nov 19, 2013, 5:49:42 PM11/19/13
to e-p...@googlegroups.com
Junho,

Just to clarify, by "get the index of a particular character in a
string" you actually mean "get the character at a particular index in
a string" (I Googled "java charat" to verify that). For both that
and getting substrings, see the "Mid, Mid$, MidB, MidB$ (functions)"
topic in the E-Basic Help facility. Note BTW that VBA/E-Basic
strings are not objects as they are in Java.

(And to get something akin to "get the index of a particular
character in a string", see the "InStr, InStrB (functions)" topic in
the E-Basic Help facility -- I do not know what the Java equivalent
might be for that.)

Good luck,
-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster )

/----
Stock reminder: 1) I do not work for PST. 2) PST's trained staff
take any and all questions at https://support.pstnet.com , and they
strive to respond to all requests in 24-48 hours, so make full use of
it. 3) In addition, PST offers several instructional videos on their
YouTube channel (http://www.youtube.com/user/PSTNET ). 4) If you do
get an answer from PST staff, please extend the courtesy of posting
their reply back here for the sake of others.
\----

Junho Oh

unread,
Nov 19, 2013, 6:13:02 PM11/19/13
to e-p...@googlegroups.com
Thank you for your help! After I posted it, I managed to find the Mid function :D
Reply all
Reply to author
Forward
0 new messages