sort string beginning at index?



I need some recommendations as to how to go about sorting a string not
from the beginning of the string, but from a given index into the
string. I am reading a data file into an array using file(), then
looping through the string which contains fields seperated by |. Do I
have to explode each individual record to sort them using
array_multisort()? What I was hoping for was something like sort
($array, SORT_STRING, 15) where 15 is the index into the string to sort
on instead of starting at 0. I've been digging through the docs
reading about sort and usort and the others but nothing looks like it
will work short of using up time and memory creating a multidimensional
array to sort.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
.



Relevant Pages

  • sort 1-D array of doubles for Olaf Schmidt
    ... A few weeks Olaf Schmidt posted a VB6 routine to sort a 1-D array of strings very fast indeed. ... fastest way to change case of string. ... Dim i As Long, j As Long, Lo As Long, Hi As Long, StPtr As Long ...
    (microsoft.public.vb.general.discussion)
  • Re: Collection Structure
    ... property StringID you want ... where inarr is the String array and outarr is an array of longs containing ... needs to sort the input array keeping track of the original position (I use ...
    (microsoft.public.vb.com)
  • Re: About word frequency
    ... Use the split function to turn the string into an array. ... Sort the array. ... For each sLine in aList ...
    (microsoft.public.scripting.vbscript)
  • Re: VB6 LISTBOX problem
    ... Have a look at the code below, can you do a sort that is faster ... There are of course all sorts of ways of sorting stuff, especially stuf that is "linked together" as in your UDTs, but to prove the following code sorts it in exactly the same way that your own original code does so, by concatenating all three items of each element into a composite string exactly as you are already doing, but instead of dumping those composite strings into a ListBox it dumps them into a VB string array. ... Private Type SAFEARRAY1D ... Dim StPtr As Long, VAs String, pVAs Long ...
    (microsoft.public.vb.general.discussion)
  • Re: more on reading csv file into access
    ... Of course you get an error, you are assigning an array to a single string, ... how on earth is it supposed to output the array, there is no magic where VB ... Dim dataVals() As String ... data file are a mixture of numbers and text fields. ...
    (microsoft.public.vb.general.discussion)