Is there anyway of validating a string so that it contains only char's

is there anyway of validating a string so that it contains only char's,no special char's and no numaric values
thanx in advance
sudharshan

It depends what you consider a long string. Running with various lengths I get the following results (Sun jvm 1.3.1, win NT 4):String length*iterations fixed as: 10000000      
times totalled over 10 tests
length  charAt  toCharArray   ratio
1       8108    23798         293.51%
2       6234    14000         224.57%
4       5846    9045          154.72%
8       5423    7608          140.29%
16      5250    5719          108.93%
32      5142    5249          102.08%
64      5062    5000          98.78%
128     5094    4875          95.70%
256     5047    4797          95.05%
512     5014    4782          95.37%
1024    4923    4874          99.00%
2048    5016    4766          95.02%
4096    5015    4813          95.97%
8192    5016    4843          96.55%
16384   5000    4984          99.68%
32768   5016    5141          102.49%
65536   5232    5643          107.86%
131072  5374    6266          116.60%
262144  5703    12188         213.71%
524288  5765    12313         213.58%
1048576 5499    9141          166.23%
2097152 4907    6906          140.74%
4194304 4936    6220          126.01%
8388608 4856    5972          122.98%So there does seem some advantange in using toCharArray for strings around 100 to 10000 characters long, which might imply that the charAt method isn't inlined in Sun's JVM. Most of the web pages recommending toCharArray run their benchmarks somewhere in this region.
Pete

Similar Messages

Maybe you are looking for

  • How to retrieve values in XML into a plsql table type

    Hi I have an XML doc like below which is a Web Service response message. <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http

  • GRC 10: How to upload Org Level Rules in GRC 10?

    Hello Friends, we have implemented GRC 10 recently but missed to move org level rules from GRC 5.3 to 10. I don't see an option to load org rules in SPRO. Can you please let me know how can i load org rules from 5.3 to 10 with out disturbing the exis

  • Error-handling in form routines to be called from maintenance  view

    hello, i have created a table maint. dialog. Under 'enviroment->modification->events' you can create form-routines for your own coding. I have the maint.event '01 - Before saving the data in the database'. Here i do some checks if entered values in s

  • How to assign smartform to print program for payment advice

    Hi! There is already a print program and a smartform for payment advice. This was working before as I was told. But when I checked table TNAPR, there is no entry in the table with the program name and neither for the smartform. How can I use them tog

  • Enhanced Podcasts not working in 10.4.4 Firefox?

    Every iWeb podcast page I've visited in Firefox 1.5 loads the QuickTime movie and shows an image and the playhead for a split second before being covered up by the QuickTime question mark image which links to the Quicktime download page. http://web.m