Prodig - Komunitas Proyek Digital
Selamat datang di ProDig!
Di sini adalah tempat untuk berbagi proyek (game, seni, program, dan situs).
Di sini Anda juga bisa mendapatkan hal lainnya seperti permainan, berbagi karya, ilmu pengetahuan, kesenangan, dan sebagainya. :)

Ayo daftar lalu langsung login tanpa perlu konfirmasi email sama sekali :D!
Prodig - Komunitas Proyek Digital

Tempat untuk berbagi proyek digital : Situs, Game, Seni, Program
 
CalendarPortalHomeRulesSearchFAQMemberlistUsergroupsRegisterLog in
Welcome to the ProDig, Guest!

 
 

 [GML] Substring Counter

View previous topic View next topic Go down 
AuthorMessage
Red Miko
Global Moderator


Status : with Kochiya-sama
Posts : 213
Chips : 2645
Power : 9
Join date : 2010-10-03
Age : 20
Location : now @ Outer-Gensokyo
Quote : DANMAKU BOUNDED FIELD!!
Badge :

PostSubject: [GML] Substring Counter   
Sun Oct 03, 2010 2:26 pm


Game Maker
Substring Counter
Compability Game Maker 6 Lite or higher
by: Irfan Gunawan

script ini di-implementasikan untuk mencari substring diantara string-string yang ada dalam suatu {variable}

Code:
var arg;
arg[0] = argument0 // substring to find
arg[1] = argument1 // find on which string

var text, pre_text, count;
text=""
pre_text=""
count=0

if arg[0] == "" then return 0

while(text!=pre_text){
  pre_text=text
  text=string_replace(arg[1],arg[0],"")
  count+=(text!=pre_text)
}

return count

silahkan copas ke gm..
arigatou~

--> O: http://vixep.forumsrpg.net/script-lainnya-f23/gm-substring-counter-t90.htm





I'm currently living together with him. It's hard to have a family.

User bar:


Did you need PREMIUM mode? Then PM me @ this site!

Wanna some BlackBerry? From Gensokyo~

--> My mostly used browser: <--

Mokofox

--> Be happy to look some Girls <--

Back to top Go down
View user profile
 

[GML] Substring Counter

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Prodig - Komunitas Proyek Digital  :: Education Chamber :: Programming :: GML-
Jump to: