Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
FileTools[Text][CountCharacters] - count the occurrences of a character in a file or count the total number of characters in a file
Calling Sequence
CountCharacters(file)
CountCharacters(file, character)
Parameters
file
-
file descriptor or filename
character
string of length 1; character to count
Description
The CountCharacters(file) command counts the number of characters from file's current position to the end of the file.
The CountCharacters(file, character) command counts the number of occurrences of character from file's current position to the end of the file.
As CountCharacters is a Text function, it counts characters, not bytes. Therefore characters represented as multiple bytes, (like "\\r\\n") are counted as a single character. This means the number of characters in a file can differ from the number of bytes in a file.
An error is raised if file is not a valid descriptor or if the filename does not exist.
Examples
See Also
file, FileTools[Position], FileTools[Remove], FileTools[Text], FileTools[Text][Close], FileTools[Text][CountLines], FileTools[Text][WriteString], IO_errors
Download Help Document