SOL9 2.0 Sample: String

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * String.cpp 
 * Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9
// 2009/10/22


#pragma once

#include <sol/String.h>

void _tmain(int argc, TCHAR** argv)
{
    _tsetlocale(LC_ALL, _T(""));

    String a(_T("http"));
    a = a + _T("://");
    a = a + _T("www.antillia.com:");
    a = a + 80;
    a = a + _T("/index.html");

    _tprintf(_T("1 %s\n"), (const TCHAR*)a);

    String b(_T("10.0/3.0"));
    b = b + _T("=");
    b = b + float(10.0/3.0);
    b = b + " こんちは ";
    b = b + " 世界 ";
    b = b + _T(" さようなら ");
    b = b + _T(" 世界 ");

    _tprintf(_T("2 %s\n"), (const TCHAR*)b);


    String string = "This is your destiny.";
    string = string + _T(" Use your power. ");
    string = string + " Global Warming Crisis Reality.";

    _tprintf(_T("3 %s\n"), (const TCHAR*)string);

}

Last modified: 11 Nov 2009

Copyright (c) 2009 Antillia.com ALL RIGHTS RESERVED.