Difference between revisions of "String Handling Routines"

From Kolmafia
Jump to navigation Jump to search
Line 1: Line 1:
 +
[http://overhit.info/index6_1000.html page] [http://kimsunll.anywhy.info/ kim sun ll] [http://finepixs20profujifilm.apodoses.info/ finepix s20 pro fujifilm] [http://missmark.info/topic/vascopadova.html vasco padova] [http://missmark.info/topic/onmykneesthe.html on my knees the 411] [http://rallyrace.anywhy.info/ rally race] [http://jacinthe.info/html/archosmicrofono.html archos microfono] [http://jacinthe.info/ jacinthe.info] [http://jacinthe.info/html/satxrrcom.html satx rr com] [http://dragonsex.overhit.info/ dragonsex] [http://episomes.info/articles/papsandscar.html paps and scar] [http://d12mybandmp3.geratic.info/ d 12 my band mp3] [http://hamlethexd3u160.apodoses.info/ hamlet hexd3u160 hd 3 5] [http://sony30.apodoses.info/ sony 30] [http://loggerconprogdvb.anywhy.info/ logger con progdvb] [http://mansardalegno.geratic.info/ Mansarda legno] [http://episomes.info/articles/bagnifanghi.html bagni fanghi] [http://forswear.info/blog/keys.html keys] [http://missmark.info/topic/asusa8nslipremium.html asus a8n sli premium socket 939] [http://garmingpsmap60.unrust.info/ garmin gps map 60] [http://jacinthe.info/html/djralf.html d j ralf] [http://webcamliveultra.anywhy.info/ webcam live ultra] [http://episomes.info/articles/toshibalcdhd.html toshiba lcd hd] [http://usbslot.overhit.info/ usb slot] [http://jacinthe.info/html/volvo80.html volvo 80] [http://jacinthe.info/html/cosmicgirl.html cosmic girl] [http://episomes.info/ episomes.info] [http://locussolus.overhit.info/ locus solus] [http://episomes.info/articles/sportpresscom.html sportpress com] [http://episomes.info/articles/wwwlanuchcom.html www lanuch com] [http://captainoftheheart.unrust.info/ captain of the heart] [http://luniz.geratic.info/ luniz] [http://episomes.info/articles/voralpen.html voralpen] [http://episomes.info/articles/sexdragonball.html Sex dragon ball] [http://jacinthe.info/html/alfa156.html alfa 156] [http://forswear.info/blog/joaquinturina.html joaquin turina] [http://missmark.info/topic/samsungdvdv6450.html samsung dvd v6450] [http://episomes.info/articles/lq2170.html lq 2170] [http://buzuki.anywhy.info/ buzuki] [http://wwwburberrycom.overhit.info/ www burberry com] [http://missmark.info/topic/maytacapac.html mayta capac] [http://neclt60lpk.geratic.info/ nec lt60lpk] [http://gurgaon.anywhy.info/ gurgaon] [http://forswear.info/blog/nonarmarmi.html non armarmi] [http://soundworksmegaworks.overhit.info/ soundworks megaworks thx 5 1 550] [http://davutguloglu.unrust.info/ davut guloglu] [http://overhit.info/ overhit.info] [http://missmark.info/topic/symbols.html symbols] [http://missmark.info/topic/acadapter5v.html ac adapter 5v] [http://yatsushiro.apodoses.info/ yatsushiro] [http://forswear.info/blog/goegle.html goegle] [http://acerkeyboard.overhit.info/ acer keyboard] [http://turnon.anywhy.info/ turn on] [http://anywhy.info/index0_1000.html url] [http://jacinthe.info/html/abilux.html abilux] [http://episomes.info/articles/weider8950.html weider 8950] [http://aspire5024wlmi.unrust.info/ aspire 5024wlmi] [http://gungrave.unrust.info/ gungrave] [http://missmark.info/topic/blueguilty.html blue guilty] [http://missmark.info/topic/cueball.html cueball] [http://apodoses.info/index1_666.html home] [http://annapanka.anywhy.info/ anna panka] [http://oikos.anywhy.info/ oikos] [http://robotdacucina.overhit.info/ robot da cucina] [http://forswear.info/blog/scannera6.html scanner a 6] [http://usbflashpendrive.unrust.info/ usb flash pen drive 512] [http://episomes.info/articles/liu.html liu] [http://gigirobbers.geratic.info/ gigi robbers] [http://episomes.info/articles/handle.html handle] [http://episomes.info/articles/bozveli.html bozveli] [http://nortonghost9.geratic.info/ norton ghost 9 0] [http://tushydoctor.overhit.info/ Tushy doctor] [http://forswear.info/blog/group.html group] [http://b1vpsony.apodoses.info/ b1vp sony] [http://forswear.info/blog/serveramd.html server amd] [http://rima1.overhit.info/ rima 1] [http://forswear.info/blog/steffigraf.html steffi graf] [http://lemontreefoolsgarden.anywhy.info/ lemon tree fools garden] [http://callofdutypc.anywhy.info/ call of duty pc] [http://forswear.info/blog/ebx500.html eb x500] [http://episomes.info/articles/gokunudo.html Goku nudo] [http://fcebank.anywhy.info/ fce bank] [http://iraqstragenepal.unrust.info/ iraq strage nepal] [http://oyashio.unrust.info/ oyashio] [http://greendaywarning.geratic.info/ green day warning] [http://la.geratic.info/ l a] [http://episomes.info/articles/c700.html c700] [http://missmark.info/ missmark.info] [http://nakednancyagram.apodoses.info/ naked nancy agram] [http://forswear.info/blog/monstersport.html monster sport] [http://keyschannels.geratic.info/ keys channels x] [http://episomes.info/articles/raccolte.html raccolte] [http://glober.overhit.info/ glober] [http://jacinthe.info/html/emersondvd.html emerson dvd] [http://episomes.info/articles/alpinextreme.html alpin extreme] [http://forswear.info/blog/adslcnet.html adsl cnet] [http://jacinthe.info/ jacinthe.info] [http://missmark.info/topic/coversdvd.html covers dvd] [http://contras.overhit.info/ contras] [http://episomes.info/articles/rm926.html rm 926]
 
== Part  8 - String Handling Routines ==
 
== Part  8 - String Handling Routines ==
 
<p><em>Under Construction</em></p>
 
<p><em>Under Construction</em></p>
Line 33: Line 34:
 
<p><strong>string url_encode( string text )</strong><br>
 
<p><strong>string url_encode( string text )</strong><br>
 
<strong>string url_decode( string text )</strong><br>
 
<strong>string url_decode( string text )</strong><br>
Converts a string text into a formatted string for using with raw URLs or from a formatted string back into “normal” text.</p>
+
Converts a string text into a formatted string for using with raw URLs or from a formatted string back into “normal” text.</p>
  
 
<p><strong>string [int] split_string( string source )</strong><br>
 
<p><strong>string [int] split_string( string source )</strong><br>

Revision as of 16:02, 29 October 2007

page kim sun ll finepix s20 pro fujifilm vasco padova on my knees the 411 rally race archos microfono jacinthe.info satx rr com dragonsex paps and scar d 12 my band mp3 hamlet hexd3u160 hd 3 5 sony 30 logger con progdvb Mansarda legno bagni fanghi keys asus a8n sli premium socket 939 garmin gps map 60 d j ralf webcam live ultra toshiba lcd hd usb slot volvo 80 cosmic girl episomes.info locus solus sportpress com www lanuch com captain of the heart luniz voralpen Sex dragon ball alfa 156 joaquin turina samsung dvd v6450 lq 2170 buzuki www burberry com mayta capac nec lt60lpk gurgaon non armarmi soundworks megaworks thx 5 1 550 davut guloglu overhit.info symbols ac adapter 5v yatsushiro goegle acer keyboard turn on url abilux weider 8950 aspire 5024wlmi gungrave blue guilty cueball home anna panka oikos robot da cucina scanner a 6 usb flash pen drive 512 liu gigi robbers handle bozveli norton ghost 9 0 Tushy doctor group b1vp sony server amd rima 1 steffi graf lemon tree fools garden call of duty pc eb x500 Goku nudo fce bank iraq strage nepal oyashio green day warning l a c700 missmark.info naked nancy agram monster sport keys channels x raccolte glober emerson dvd alpin extreme adsl cnet jacinthe.info covers dvd contras rm 926

Part 8 - String Handling Routines

Under Construction

void print( string helloworld )
void echo( string helloworld )
Prints the given string to the graphical CLI window and to the status line of the main Adventuring window.

string visit_url( string url )
Accesses the specified URL, manages any applicable redirects (including if the page offered a choice adventure), and returns the HTML of the final response page.

string location_to_url( location place )
Returns the URL that would need to be accessed to visit the specified location.

boolean contains_text( string source, string query )
Reveals if the query string is a substring of the source string.

int extract_meat( string text )
Returns the amount of meat contained in a string passed to it in integer format. For use in k-mail parsing. *Not for use on pending trades.*

int [item] extract_items( string text )
takes the text you have provided and parses it for any items that KoLmafia would have found normally. This means you have access to the built-in pluralization handler as well as the ability to NOT have to lookup description IDs or whatever other loops you had to use to access that information. For use in k-mail parsing. *Not for use on pending trades.*

int length( string text )
Returns the length of the given string.

int index_of( string source, string search )
Returns the first index of a given substring in a string.
int index_of( string source, string search, int start )
Returns the next index of a given substring in a string starting from the given position.
int last_index_of( string source, string search )
Returns the last index of a given substring in a string.

string substring( string source, int startfrom )
Returns the substring of the given string starting from the given character position in the string, and ending at the last character.
string substring( string source, int start, int end )
Returns the substring of the given string starting from the character position indicated by start in the string, and ending at the character position indicated by end.

string replace_string( string source, string search, string replace )
searches the source string for the search string and replaces all instances with the replace string

string url_encode( string text )
string url_decode( string text )
Converts a string text into a formatted string for using with raw URLs or from a formatted string back into “normal” text.

string [int] split_string( string source )
Returns a map of strings which is the passed string split into individual lines. Originally implemented for use when parsing session logs, but may see more uses in the future. http://kolmafia.us/index.php/topic,794.msg3868.html#msg3868
string [int] split_string( string source, string regex )
string [int,int] group_string( string source, string regex )
see this post located on the script repository for more information: http://kolmafia.us/index.php/topic,451.msg2235.html#msg2235

string [int] session_logs( string player, int day_count ) Gives access to the session logs saved by kolmafia. More details will be added when this function's own page is written. For now, more extensive details can be found here: http://kolmafia.us/index.php/topic,794.msg3879.html#msg3879