/*
 * SDK Pullenti Lingvo, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software.
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */


const UnicodeInfo = require("./UnicodeInfo");

// Введено для ускорения Питона!
class TextWrapper {
    
    constructor(txt, toUpper) {
        this.chars = new Array();
        this.text = null;
        this.length = 0;
        if (toUpper && txt !== null) 
            this.text = txt.toUpperCase();
        else 
            this.text = txt;
        this.length = (txt === null ? 0 : txt.length);
        if (txt !== null) {
            for (let i = 0; i < txt.length; i++) {
                this.chars.push(UnicodeInfo.getChar(txt[i]));
            }
        }
    }
    
    toString() {
        return this.text.toString();
    }
}


module.exports = TextWrapper