Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
morgair
Beginner


Joined: 10 Nov 2000
Posts: 24
Location: USA

PostPosted: Mon Mar 31, 2003 2:13 pm   

occurances in a list
 
was just curious if there was a way to search through a list variable and return the number of occurances of a particular string

for instance if i have
A rock|A kid|A kid|A Bear|An Orc|A troll|A kid
and i want to know how many times each item in the list appears so i could get a result like
1-A rock 3-A kid 1-A Bear 1-An Orc 1-A troll
any suggestions on how i might do that?

Morgair, Master of the Obvious
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 31, 2003 4:56 pm   
 
%countlist() function. It's in the Function Reference under Database functions.

LightBulb
Advanced Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net