|
-
Jan 26th, 2004, 02:11 PM
#1
Thread Starter
Hyperactive Member
asc() and chr() in JavaScript
are there equivalent statements in JavaScript to VB's asc() and chr()?
-
Jan 26th, 2004, 03:36 PM
#2
Addicted Member
I'm just guessing, double check the documentation (links in my sig).
String.charCodeAt(index)
String.fromCharCode(num1, num2,...)
Travis, Kung Foo Journeyman
Web Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.5 Guide and Reference
Perl: Documentation, Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
OSS: Mozilla, MySQL (Manual)
-
Jan 26th, 2004, 03:37 PM
#3
Strings have charCodeAt, which is like asc, and fromCharCode, which is like chr.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 26th, 2004, 03:37 PM
#4
Travis was faster, but unlike him I already checked the docs
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 26th, 2004, 03:40 PM
#5
Addicted Member
Originally posted by CornedBee
Travis was faster, but unlike him I already checked the docs
Yeah, sorry. I just checked them, too. I'm looking for a refresh. But I found out that these are Unicode values and not ASCII values. Shouldn't be a problem, but it depends on what you want to use them for.
Travis, Kung Foo Journeyman
Web Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.5 Guide and Reference
Perl: Documentation, Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
OSS: Mozilla, MySQL (Manual)
-
Jan 26th, 2004, 06:34 PM
#6
Thread Starter
Hyperactive Member
thanks guys. I appreciate it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|