Forums / Developer / a while

a while

Author Message

jb bianchi

Friday 19 August 2005 8:09:56 am

hi,

I want to read a string but char by char in order to count the char but I want to set condition:
if I read a char like ">" , I stop the reading and I return the counter.

I think I have to use a while but I miss something. In fact I don(t know how I can read char by char of a string.

thank's

eZ debug

Timing: Jan 20 2025 09:48:14
Script start
Timing: Jan 20 2025 09:48:14
Module start 'content'
Timing: Jan 20 2025 09:48:15
Module end 'content'
Timing: Jan 20 2025 09:48:15
Script end

Main resources:

Total runtime1.3462 sec
Peak memory usage4,096.0000 KB
Database Queries47

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.8828180.8594
Module start 'content' 0.00661.3311 770.7422403.2969
Module end 'content' 1.33770.0084 1,174.039138.1563
Script end 1.3461  1,212.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.2177140.0002
Check MTime0.00120.0879140.0001
Mysql Total
Database connection0.00070.052810.0007
Mysqli_queries1.307497.1135470.0278
Looping result0.00040.0330450.0000
Template Total1.305997.020.6530
Template load0.00230.170920.0012
Template processing1.303696.834520.6518
Template load and register function0.00020.013810.0002
states
state_id_array0.00210.153510.0021
state_identifier_array0.00290.214520.0014
Override
Cache load0.00180.135080.0002
Sytem overhead
Fetch class attribute can translate value0.00120.086310.0012
Fetch class attribute name0.00110.083610.0011
XML
Image XML parsing0.00020.015110.0002
class_abstraction
Instantiating content class attribute0.00000.000710.0000
General
dbfile0.00440.3254120.0004
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs