Ignore:
Timestamp:
2010-10-13T14:23:00+13:00 (14 years ago)
Author:
kjdon
Message:

added a method get_total_text_length. returns the total lenght for the document, ie al the text lengths for each section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/doc.pm

    r22950 r23131  
    926926}
    927927
     928# returns the total length for all the sections
     929sub get_total_text_length {
     930    my $self = shift (@_);
     931
     932    my $section = $self->get_top_section();
     933    my $length = 0;
     934    while (defined $section) {
     935    $length += $self->get_text_length($section);
     936    $section = $self->get_next_section($section);
     937    }
     938    return $length;
     939}
     940
    928941sub delete_text {
    929942    my $self = shift (@_);
Note: See TracChangeset for help on using the changeset viewer.