Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Enhanced String Commands

Author
Message
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 13th Aug 2013 06:53 Edited at: 20th Aug 2013 19:52
I found this code from Dark Basic Pro, courtesy from Tapewormz. I converted it over to AGK. I had to made changes to some of the code (return types have to be the same in AGK) so now any errors will automatically throw up a warning message and then end the program.

Here's a list of functions:

Quote: "DELETE
Delete character or string within a string. Single instance or every instance
can be specified.

ERROR
String function error messages.

FOUND
Return Value=Instances of a character or string within a string.

GET
Return String=Character or string within a string.

INSTR
Return Value=Location of first character of a character or string within a
string.

PUT
Puts a string in a string. Overwrite or insert option can be specified.

REPLACE
Replaces a character or string with a character or string. First instance,
specified instance, or every instance can be specified.

SHIFT
Shift string left or right a specified number of characters.

SWAP
Swap character or string with a specified character or string. First
instance, specified instance or every instance can be specified."


There might be some bugs, but I attached a program that does a simple test of each function.

Hi there. My name is Dug. I have just met you, and I love you.

Attachments

Login to view attachments
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 20th Aug 2013 19:52
BUMP!
Hey everyone,
I realized I uploaded a non-functioning version of the code. I uploaded a working copy, and all string commands work as advertised.

Hi there. My name is Dug. I have just met you, and I love you.

Login to post a reply

Server time is: 2024-11-24 17:28:07
Your offset time is: 2024-11-24 17:28:07