MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Position

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67639] Position
  • From: Bruce Colletti <vze269bv at verizon.net>
  • Date: Mon, 3 Jul 2006 06:37:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Let X be a list of strings having diverse lengths (some are the null string ""). 

What command returns the position in X of the first element that starts with "abcd"?

Presumably the command looks like Position[X,...,Heads->False], but my attempts have come up dry.  Although StringTake[Y,4]=="abcd" would seem to be part of the command, this fails when the string's length is less than 4.

Thankx.

Bruce

 


  • Follow-Ups:
  • Prev by Date: Re: Problem with Calendar library
  • Next by Date: Re: Drawing outline of 3D shape
  • Previous by thread: RE: double line spacing in notebook
  • Next by thread: Re: Position