Changeset 1088


Ignore:
Timestamp:
Aug 2, 2003, 3:03:19 PM (17 years ago)
Author:
luba
Message:
  • String-Replace is rewritten using function String
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/library/String/string_replace.cc

    r1025 r1088  
    1515{
    1616
     17RF_DECL(String);
     18
    1719RF_FUNC (String_m_Replace, (RF_ARG s_String, e_Sourse), ())
    18   if (s_String.get_len() == 1) {
    19 
     20  if (s_String.get_len() == 1)
     21  {
    2022    Term* p_String = s_String.get_first();
    2123    rftype::String* str = p_String->cast_to<rftype::String>(type_string);
    22 
    23     if (str) {
    24       Term* p = e_Sourse.get_first();
    25       WString s;
    26  
    27       for (p = e_Sourse.get_first(); p < e_Sourse.get_last(); p++) {
    28          s = s + WString(*p);
    29       }
    30       rftype::String wstr = rftype::String(s);
    31       rftype::String* s_ptr = &wstr;
    32       str = s_ptr;
     24    if (str)
     25    {
     26      RF_CALL (String, (e_Sourse), (s_String));
    3327    }
    3428    else
Note: See TracChangeset for help on using the changeset viewer.