Bookmark Topic Watch Topic
  • New Topic

length of the string

 
s john smith
Greenhorn
Posts: 16
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Report post to moderator
how to find the nuber of characters in the string without using length() or any standard library function?
 
Rod Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Paul Clapham
Sheriff
Posts: 21113
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Rod Singh wrote:


How is String.toCharArray() not a "standard library function"?
 
Matthew Brown
Bartender
Posts: 4567
8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of http://www.coderanch.com/t/568433/java/java/find-number-characters-string

(Locking this thread)
 
    Bookmark Topic Watch Topic
  • New Topic