Show
Ignore:
Timestamp:
05/04/08 18:12:38 (8 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted the char[] to String and use the an alias.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/dwthelper/XmlTranscode.d

    r198 r212  
    1010 + The given string is modified. 
    1111 +/ 
    12 char[] xmlUnescape( char[] str ){ 
     12String xmlUnescape( String str ){ 
    1313 
    1414    void error(){ 
     
    1818    // &#1234; 
    1919    // &#x12AF; 
    20     char[] src = str; 
    21     char[] trg = str; 
     20    String src = str; 
     21    String trg = str; 
    2222    while( src.length ){ 
    2323        if( src[0] !is '&' ){ 
     
    3535            if( semi is len ) error(); // no semi found 
    3636 
    37             char[] entityName = src[ 0 .. semi ]; // name without semi 
     37            String entityName = src[ 0 .. semi ]; // name without semi 
    3838            dchar entityValue = 0; 
    3939            switch( entityName ){ 
     
    8080            arr[0] = entityValue; 
    8181            uint ate = 0; 
    82             char[] res = tango.text.convert.Utf.toString( arr, trg, &ate ); 
     82            String res = tango.text.convert.Utf.toString( arr, trg, &ate ); 
    8383            trg = trg[ res.length .. $ ]; 
    8484            src = src[ semi +1 .. $ ]; // go past semi 
     
    9595 + If processing is needed, a new string is allocated. 
    9696 +/ 
    97 char[] xmlEscape( char[] xml ){ 
     97String xmlEscape( String xml ){ 
    9898    bool needsReplacement( dchar c ){ 
    9999        switch( c ){ 
     
    122122 
    123123    // yes, do a new string, start with +20 chars 
    124     char[] res = new char[ xml.length + 20 ]; 
     124    String res = new char[ xml.length + 20 ]; 
    125125    res.length = 0; 
    126126