Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

count characters in a file

What is code for counting the number of characters in a file?
I've written out a file, now i want the number of characters in it.
0
xoxomos
Asked:
xoxomos
1 Solution
 
amxCommented:
i'm assuming that if you have written out the file then you must have asssigned it to a String variable before printing out the file.

if you have then you could just find out the length of the string which would be the same as the number of characters.

0
 
objectsCommented:
file.length();
0
 
xoxomosAuthor Commented:
Thanks, I don't know how this got in there 4 times.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now