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

Last change on this file since 1010 was 1010, checked in by pooh, 18 years ago
  • More work on long arithmetic.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 620 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 = %u\n", i);
15  for (size_t i = 0; i < str.get_length(); i++) {
16    printf ("str[i] = %c\n", str[i]);
17    printf("create_expr\n");
18  }
19  return e;
20}
21
22Expr String::fill(String& _str, size_t _pos, size_t _len, wchar_t const _fill)
23 {
24  for (size_t i = _pos; i < _len ; i++) {
25    _str[i] = _fill;
26  }
27  return String::create_expr(&_str);
28}
29
30
31}
Note: See TracBrowser for help on using the repository browser.