hp's substr function?

  • From: Alex Hall <mehgcap@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 06 May 2009 10:35:17 -0400

I read the substr documentation, but it seems kind of confusing. Could someone explain it in a simple way? I get that it returns part of a string and that it takes, the string to examine, the start position, and the length, but beyond that I am not sure. That is, I do not understand how to implement it. Say I have the string "12-34" and I want to say "if the character at position 2 of the string is "-" (dash), then do something". How would I do this? Similarly, how would I use substr to return the "12" of the above string? Thanks!


Have a great day,
Alex
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts:

  • » hp's substr function? - Alex Hall