Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

hi, how the heck do i convert a string into its equivalent ascII num

cmario00cmario00 Member Posts: 12
I need to convert a characters into ascII numbers in order to do some simple caesar shifting (just for testing purposes obviously). Can someone tell me how to do this? Thank you.

Mario Aguilera
[email protected]

Comments

  • SouldrinkerSouldrinker Member Posts: 143
    First of all: stay cool! :-)

    And now, here is the function to return the ascII Value of some char:

    int ord ( char char )

    you could use the function something like this:

    $my_val = ord ( " " );

    "$my_val" would now contain the value "32".

    have a nice day!

    best regards,

    sebastian mohrenstecher
    executive secretary
    net::allies

    www.net-allies.de
    [email protected]

  • cmario00cmario00 Member Posts: 12
    i knew there had to be a function for that, couldn't find it anywhere though. Thanks
  • Andre YoungAndre Young USAMember Posts: 0

    _____ // http://forcoder.org // free video tutorials and ebooks about / Scratch, Objective-C, Ruby, Perl, Go, Assembly, Python, R, C++, Java, Delphi, PL/SQL, Swift, Visual Basic, C#, PHP, JavaScript, Visual Basic .NET, MATLAB, C Alice, COBOL, Julia, Dart, LabVIEW, Kotlin, F#, Scala, Clojure, SAS, Lua, Awk, Fortran, Transact-SQL, Hack, Logo, FoxPro, Apex, Rust, Scheme, Lisp, ML, ABAP, VBScript, Bash, Ada, Prolog, Erlang, Crystal, D / _______

Sign In or Register to comment.