Jump to content

Recommended Posts

Posted (edited)

I have been working on making some simple UDFs just to make programming in autoit more simple. One of them was the sql.au3 but thats already posted in its own topic, so no point in posting it here. I don't have very many yet, but im trying to make more.

addslashes( string ) Creates a function exactly like php's addslashes function.

Func addslashes($string)
    Local $output = StringReplace ( $string, '\', '\\' )
    $output = StringReplace ( $output, "'", "\'" )
    $output = StringReplace ( $output, '"', '\"' )
    $output = StringReplace ( $output, 'NUL', '\NUL' )
    Return $output
EndFunc

more to come!

edit: oops. addslashes will exit ' and " twice, hence exiting the exit :whistle: i will fix that...

edit: fixed

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...