source: to-imperative/trunk/runtime/rf_string.cc @ 887

Last change on this file since 887 was 887, checked in by luba, 18 years ago
  • String class
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 623 bytes
Line 
1#include "rf_string.ih"
2#include "rf_expr.ih"
3#include "rf_types.ih"
4
5namespace rftype 
6{
7
8using namespace rfrt ;
9
10Expr String::create_expr(String*  _string) {
11  Expr e = Expr(dynamic_cast<Object*>(_string));
12  WString str = WString(e);
13  size_t i = str.get_length();
14  printf("i = \n", i);
15  for (size_t i = 0; i < str.get_length(); i++) {
16
17    printf ("str[i] = %c\n", str[i]);
18    printf("create_expr\n");
19  }
20  return e; 
21}
22
23Expr String::fill(String& _str, size_t _pos, size_t _len, wchar_t const _fill)
24 {
25  for (size_t i = _pos; i < _len ; i++) {
26    _str[i] = _fill;
27  }
28  return String::create_expr(&_str);
29}
30
31
32}
Note: See TracBrowser for help on using the repository browser.