String Handling Routines

From Kolmafia
Revision as of 10:52, 13 November 2007 by 208.48.253.137 (talk)
Jump to navigation Jump to search

mosess life story 2005 films 250 air conditioning home unit up juste avant subastas accord service bulletin new brian eno southern scene the science of selling yourself short mac html editor review state infrastructure bank california acrylic acid polymerisation air force general officer announcements ap world history tests interactive math websites for first graders australian song artists southern california phone answering service addisons dogs oracle database performance problems amex corporate cards plant cells have cell walls maps of australian paul simon photograph 1900 switch prohibition in canada what is conventional agriculture the pump nyc pink shell hotel florida there youll be sports radio boston ma linares nuevo leon mexico western blvd niagara falls hotel casino membership cancellation letters 1010 canada distance long entry level it resume 2006 by draft nfl team 3d mazes games letter writing for kid lesbian smut west coast trail bc met-art fucking media center edition support equipment laboratory scientific oregon grille maryland tag agency florida making lollipops weather program mac wrestling beauty military service songs tivo faqs auto gps review system wifes tits right triangle 45 45 90 world news report college section 5 basketball schedule north western train timetables macintosh online poker 2nd grade word lists abnormal thyroid gland function amateur fucking strap my fair lady cast of characters what is independent and dependent variable 1 cotton rope kids cutouts a to z learning zoo scuderie adapter connection direct x andrew car texas used teen thumb tgp letter like someone learning sql database lebanese media links off switch white bathroom wall cabinets singles agencies lexus interior part export quotas tsunamis forms around cash comes johnny lyric man when legal redress paul clements nice picture gallery virginia real estate law man older screwing infection pregnant tract urinary 18 clubs los angeles refried state of florida licenses stewart patterson womens health fitness living nature products american pile driving wrinkled people vans plat amy chen tierra de jefes the humble bee acc mp3 conversion music group expose underaged girls ex girlfriend letter insert html email image the life dvd review large lava rocks newfoundland info amd 64 754 los simpsons fotos south creek acres asia pacific region facts en monos puerto rico my dream girl escorts add child treatment randy johnson love school christmas plays mas nou golf club non flammable gases air conditioning repair allen microsoft usb gps receiver tiffanys store san francisco laptops offers uk simple squamous epithelium tissue tow ropes renewing us asp news elements of realism osteoarthritis help latest songs downloading sites ancient rome bath houses rv magazine canada nfl films music download increase intrinsic motivation elements surrounding 2004 tax rate schedule irs search employment new jersey mayors arrested atlanta black college georgia the whole lot directory is not accessible. incorrect function. medical school rankings sno dome 1 mile equal feet nba tv international schedule sage medical products lindsey lohan porn six pack holder matthew craig smith stable air lemon aid com absence civil commission employee law philippine service like listen sound stomach mobile ultrasound business 5 percent club what about us passport to travel to hawaii practice law in california toad music add greeting link kind words for children making your own baby shower invitations ip networks inc san diego animal shelter thompson twins mating girls the drill lyrics legume tree kailua high road alloys most effective mens antidepressant ac newman let your light shine down womens shoes size 9.5 injury in hockey quickbook online login tooling press brake win an ipod mba in uk sims 2 cheats and oven roaster pictures of a normal lung arc length examples 2006 day mother air force fire protection ps to pdf converter free software patent copyright impact prospects stuff for aim profile oil refineries in us smartest cities the good life tab ancient found in mexico pyramid world of britney pictures rate my nude ass insulated panel wood phone from morocco software access point wireless 12 days of christmas gift ideas pets stores melbourne myspace.com rodriguez site patriots helmets boots naturalizer shoes discount baby bedding luxury hotels chester baltimore cruise sapphire ring panda antivirus download favor wedding work at home electronics stores audio cars woman seeking man mobile home loan houston swingers clubs samsung dlp mexicana airline college search chevrolet ceramic tile wigs live video chat room cock rings furniture dining room date line 2007 audi tt casino gambling ferrari star trek ringtones gucci replica handbags box sprintpcs ringtones sbc yahoo pet insurance body building rolex replica watch herpes novelty phone rubber stamps water exercises viagra drug plumbing free ring tones depakote hitting concert ticket cheap phentermine free shipping online poker site wedding programs kitchen curtain shower panels cheap oakleys nextel cell phone hotel with honeymoon suite jobs usa paris hilton hunting ontario online investing secret ringtone car dealers outdoor patio furniture cushions vw beetle parts alternative medicine thermostat wireless real estate massachusetts central air conditioner boston university vicodin foreclosed canadian immigration air canada nissan pathfinder buy acyclovir grave stone xxx movies toyota truck mp3 music download porsche parts online used car runescape money hotels cheap hotels amsterdam building stairs ford gt lighting tours company italy coffee franchises above ground swimming pool testosterone cream truck beds pirate halloween costume eva airline man swiss army watch gardening boots amsterdam cheap hotel single african woman sport betting cellular nextel phone email marketing software levi jeans bad credit mobile home loan

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