aspose file tools*
The moose likes Beginning Java and the fly likes length of the string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

length of the string

s john smith
Greenhorn

Joined: Jan 12, 2012
Posts: 16

how to find the nuber of characters in the string without using length() or any standard library function?
Rod Singh
Greenhorn

Joined: Feb 10, 2012
Posts: 16
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That works if you don't count toCharArray as a "standard library function". Which is fine with me, it's up to the question-setter to define what a "library function" is and how you tell whether it's "standard" or not.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Please UseOneThreadPerQuestion.(⇐click)

You've already been told it's not possible. If you don't like the answers you got, please discuss them in that thread, rather than starting a new one with the same question.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Rod Singh wrote:


How is String.toCharArray() not a "standard library function"?
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4366
    
    8

Duplicate of http://www.coderanch.com/t/568433/java/java/find-number-characters-string

(Locking this thread)
 
jQuery in Action, 2nd edition
 
subject: length of the string