How can I append PATH to environment["PATH"] in runtime?

2020-03-12 Thread Marcone via Digitalmars-d-learn
environment["PATH"] ~= r";D:\folder\"; // Error

Re: DMD: Is it possible change compile time errors to runtime errors in Dlang?

2020-03-06 Thread Marcone via Digitalmars-d-learn
On Friday, 6 March 2020 at 05:31:57 UTC, Mathias Lang wrote: On Friday, 6 March 2020 at 04:56:28 UTC, Marcone wrote: Is it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it? No it's not possible, D is a statically typed language. Why would you want erro

DMD: Is it possible change compile time errors to runtime errors in Dlang?

2020-03-05 Thread Marcone via Digitalmars-d-learn
Is it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it?

Re: How make wsatring or dstring default for string and literals?

2020-02-24 Thread Marcone via Digitalmars-d-learn
On Monday, 24 February 2020 at 19:28:43 UTC, Adam D. Ruppe wrote: On Monday, 24 February 2020 at 19:27:04 UTC, Marcone wrote: I live in Brazil and speak português brasileiro and need make programs that is good with words like ã, á, ç, ê, etc. Regular string works with those just fine too.

How make wsatring or dstring default for string and literals?

2020-02-24 Thread Marcone via Digitalmars-d-learn
I live in Brazil and speak português brasileiro and need make programs that is good with words like ã, á, ç, ê, etc. How can I make wstring or dstring default for string and literals? I don't want to explicit this every time.

Re: books for learning D

2020-02-09 Thread Marcone via Digitalmars-d-learn
Programming in D - Tutorial and Reference 1st Edition Free PDF Book. Download: http://ddili.org/ders/d.en/index.html

Re: How to converte string to wstring[]?

2020-02-08 Thread Marcone via Digitalmars-d-learn
On Friday, 7 February 2020 at 06:20:09 UTC, novice2 wrote: import std.conv: to; string str = "test1"; wstring[] wstr = [to!wstring(str)]; Thank you!

Re: total newbie + IDE

2020-02-08 Thread Marcone via Digitalmars-d-learn
You don't need an IDE for run Dlang. I Use "Sublime Text". Very good for Dlang.

Re: How make Executable Dlang EXE ask for "Run as Administrator"?

2020-02-07 Thread Marcone via Digitalmars-d-learn
Solved adding this code in resource.rc, converted to resource.res and linked to .d source. This code add the file "manifest.manifest" to resource. 1 24 "manifest.manifest"

How to converte string to wstring[]?

2020-02-06 Thread Marcone via Digitalmars-d-learn
How to converte "string" to wstring[] in Dlang?

Re: What is wrong with this function that I can not get resource content?

2020-02-05 Thread Marcone via Digitalmars-d-learn
Sorry! Solved. Just need add # in this line: get_resource("#300", "BMP", "melancia.bmp");

Re: What is wrong with this function that I can not get resource content?

2020-02-05 Thread Marcone via Digitalmars-d-learn
I get resource "melancia.bmp" but the file is corrupted.

What is wrong with this function that I can not get resource content?

2020-02-05 Thread Marcone via Digitalmars-d-learn
// Function get_resource() void get_resource(const(wchar)* id, const(wchar)* tipo, const(wchar)* path_name){ HRSRC file = FindResource(null, id, tipo); DWORD size = SizeofResource(NULL, file); HGLOBAL load = LoadResource(NULL, file); HANDLE new_file = CreateFile(path_nam

Re: How make Executable Dlang EXE ask for "Run as Administrator"?

2020-02-03 Thread Marcone via Digitalmars-d-learn
On Saturday, 1 February 2020 at 08:14:19 UTC, Ferhat Kurtulmuş wrote: On Saturday, 1 February 2020 at 06:26:04 UTC, Marcone wrote: [...] Disclaimer: did not tried. You must somehow embed this manifest file into your exe using some linker parameter. Or put this manifest next to your exe by n

Re: How add resource.res in RDMD

2020-02-03 Thread Marcone via Digitalmars-d-learn
On Monday, 3 February 2020 at 05:11:30 UTC, Boris Carvajal wrote: On Monday, 3 February 2020 at 03:03:20 UTC, Marcone wrote: On Sunday, 2 February 2020 at 06:03:06 UTC, Marcone wrote: I like use rdmd when I am programming. But I need that the program use resource file becouse I am creating prog

Re: How add resource.res in RDMD

2020-02-02 Thread Marcone via Digitalmars-d-learn
On Sunday, 2 February 2020 at 06:03:06 UTC, Marcone wrote: I like use rdmd when I am programming. But I need that the program use resource file becouse I am creating program with gui win32api. How can I add resource when use rdmd? No one knows how add resource .res file in rdmd?

How add resource.res in RDMD

2020-02-01 Thread Marcone via Digitalmars-d-learn
I like use rdmd when I am programming. But I need that the program use resource file becouse I am creating program with gui win32api. How can I add resource when use rdmd?

How make Executable Dlang EXE ask for "Run as Administrator"?

2020-01-31 Thread Marcone via Digitalmars-d-learn
I created a program in Dlang and compiled to exe using dmd. But my program need administrator privileges. How can I make executable dlang program ask for administrator privileges on start up program?

Re: How change window Backgound Color when press a Button when using "ResEdit Resource Editor" to design?

2020-01-29 Thread Marcone via Digitalmars-d-learn
On Thursday, 30 January 2020 at 04:29:42 UTC, bauss wrote: On Thursday, 30 January 2020 at 03:49:29 UTC, Marcone wrote: I created a GUI using "ResEdit Resource Editor" and embeded to Dlang using this code above. Now I want to change the window Backgound Color when press a Button. How can I make

How change window Backgound Color when press a Button when using "ResEdit Resource Editor" to design?

2020-01-29 Thread Marcone via Digitalmars-d-learn
I created a GUI using "ResEdit Resource Editor" and embeded to Dlang using this code above. Now I want to change the window Backgound Color when press a Button. How can I make it? import core.sys.windows.windows; import core.sys.windows.commctrl; import std.stdio; pragma(lib, "gdi32.lib"); pra

How to convert "string" to const(wchar)* ?

2020-01-28 Thread Marcone via Digitalmars-d-learn
How to convert "string" to const(wchar)* ? The code bellow is making confuse strange characters. cast(wchar*) str

Re: How to convert this C++ code to Dlang? Please send me Dlang version of this C++ code

2020-01-27 Thread Marcone via Digitalmars-d-learn
On Monday, 27 January 2020 at 13:41:13 UTC, Ferhat Kurtulmuş wrote: On Monday, 27 January 2020 at 13:24:03 UTC, Marcone wrote: On Monday, 27 January 2020 at 13:07:20 UTC, rumbu wrote: [...] Thank you very much! But I have this error when I try to compile: Error 42: Symbol Undefined _InitCo

Re: How to convert this C++ code to Dlang? Please send me Dlang version of this C++ code

2020-01-27 Thread Marcone via Digitalmars-d-learn
On Monday, 27 January 2020 at 13:07:20 UTC, rumbu wrote: On Monday, 27 January 2020 at 11:34:47 UTC, Marcone wrote: [...] Translated (including errors & comments): import core.sys.windows.windows; import core.sys.windows.commctrl; import std.stdio; HINSTANCE hInst; extern(Windows): BOOL D

How to convert this C++ code to Dlang? Please send me Dlang version of this C++ code

2020-01-27 Thread Marcone via Digitalmars-d-learn
#include #include #include #include "resource.h" #include HINSTANCE hInst; BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_INITDIALOG: { } return TRUE; case WM_CLOSE: { EndDialog(hwndDlg, 0);

Re: How to remove whitespace from a string

2020-01-17 Thread Marcone via Digitalmars-d-learn
On Thursday, 16 January 2020 at 13:36:10 UTC, Namal wrote: Hello, what is the way to remove whitespace from a string (not only at the beginning and end).. import std; void main(){ string name = " Marvin Will "; writeln(name.replace(" ", "")); // MarvinWill }

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-12 Thread Marcone via Digitalmars-d-learn
On Saturday, 11 January 2020 at 14:21:25 UTC, Adam D. Ruppe wrote: On Saturday, 11 January 2020 at 12:22:25 UTC, Marcone wrote: wchar[1024] szFileName = 0; ofn.lpstrFile = cast(LPWSTR) szFileName; You shouldn't cast there, just use `szFileName.ptr` instead. ofn.nMaxFile = MAX_PAT

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. Solution: import std; import core.sys.windows.windows; pragma(lib, "comdlg32"); // Function askop

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. This code works, but I can't get file Path. Someone can help me? import std; import core.sys.windo

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Saturday, 11 January 2020 at 00:12:03 UTC, René Heldmaier wrote: On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. Have a look at this website:

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 15:44:53 UTC, Mike Parker wrote: On Friday, 10 January 2020 at 15:06:07 UTC, Marcone wrote: Very complicated. Can you send me the simple clear code? https://docs.microsoft.com/en-us/windows/win32/dlgbox/using-common-dialog-boxes Not compile in Dlang.

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-10 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 14:52:36 UTC, Adam D. Ruppe wrote: On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. You just call GetOpenFileName or

Win32 Api: How create Open/"Save as" Dialog?

2020-01-10 Thread Marcone via Digitalmars-d-learn
How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much.

Re: Win32 Api: How create a Color Dialog?

2020-01-10 Thread Marcone via Digitalmars-d-learn
On Thursday, 9 January 2020 at 21:55:26 UTC, Dennis wrote: On Thursday, 9 January 2020 at 13:04:33 UTC, Marcone wrote: [...] Windows has the 'common dialog' module with a ChooseColor function you can use. [...] Very Good! Working very well!

Win32 Api: How create a Color Dialog?

2020-01-09 Thread Marcone via Digitalmars-d-learn
I am creating a GUI using winsamp.d as model. See the window here: https://i.ibb.co/ZJ4v2KD/Sem-t-tulo.png I want to ask a user for choose a color when click Configuration/Color, and then change backgroud color of GUI. But how can I create a Color Dialog? There's dlang example in the web and I

Re: How load icon from resource using LoadImage?

2020-01-05 Thread Marcone via Digitalmars-d-learn
On Sunday, 5 January 2020 at 15:13:17 UTC, Rumbu wrote: On Sunday, 5 January 2020 at 13:33:35 UTC, Marcone wrote: I am using this code to load icon from local directory, but I want to load icon from resource.res file: wndclass.hIcon = LoadImage( NULL, "icon.ico", IMAGE_ICON, 0, 0, LR_LOADFRO

How load icon from resource using LoadImage?

2020-01-05 Thread Marcone via Digitalmars-d-learn
I am using this code to load icon from local directory, but I want to load icon from resource.res file: wndclass.hIcon = LoadImage( NULL, "icon.ico", IMAGE_ICON, 0, 0, LR_LOADFROMFILE| LR_SHARED | LR_LOADTRANSPARENT);

Re: How run program with RDMD when code need load C++ code compiled by DMC to .obj?

2020-01-02 Thread Marcone via Digitalmars-d-learn
On Friday, 3 January 2020 at 05:12:21 UTC, Marcone wrote: Using dmd run compile very whell: dmd Program.obj cpp.obj But with rdmd not work. extern(C++) void teste(); void main(){ teste(); } OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights rese

How run program with RDMD when code need load C++ code compiled by DMC to .obj?

2020-01-02 Thread Marcone via Digitalmars-d-learn
Using dmd run compile very whell: dmd Program.obj cpp.obj But with rdmd not work.

Re: Concatenation/joining strings together in a more readable way

2020-01-02 Thread Marcone via Digitalmars-d-learn
On Wednesday, 25 December 2019 at 12:39:08 UTC, BoQsc wrote: Are there any other ways to join two strings without Tilde ~ character? I can't seems to find anything about Tilde character concatenation easily, nor the alternatives to it. Can someone share some knowledge on this or at least point

Re: Concatenation/joining strings together in a more readable way

2020-01-01 Thread Marcone via Digitalmars-d-learn
On Wednesday, 25 December 2019 at 12:39:08 UTC, BoQsc wrote: Are there any other ways to join two strings without Tilde ~ character? I can't seems to find anything about Tilde character concatenation easily, nor the alternatives to it. Can someone share some knowledge on this or at least point

Re: Concatenation/joining strings together in a more readable way

2019-12-31 Thread Marcone via Digitalmars-d-learn
On Monday, 30 December 2019 at 14:56:59 UTC, mipri wrote: On Monday, 30 December 2019 at 10:23:14 UTC, Marcone wrote: On Monday, 30 December 2019 at 09:41:55 UTC, mipri wrote: This leaks too much. writeln("Helo {} {}".format("xx", "name")); // Helo xx name writeln("Helo {} {}".format("{}

Re: Concatenation/joining strings together in a more readable way

2019-12-31 Thread Marcone via Digitalmars-d-learn
On Monday, 30 December 2019 at 14:56:59 UTC, mipri wrote: On Monday, 30 December 2019 at 10:23:14 UTC, Marcone wrote: On Monday, 30 December 2019 at 09:41:55 UTC, mipri wrote: This leaks too much. writeln("Helo {} {}".format("xx", "name")); // Helo xx name writeln("Helo {} {}".format("{}

Re: Concatenation/joining strings together in a more readable way

2019-12-30 Thread Marcone via Digitalmars-d-learn
On Monday, 30 December 2019 at 09:41:55 UTC, mipri wrote: On Monday, 30 December 2019 at 06:47:37 UTC, Marcone wrote: Use Python format() style: import std; import std: Format = format; // format() string format(T...)(T text){ string texto = text[0]; foreach(count, i; text[1..$

Re: Concatenation/joining strings together in a more readable way

2019-12-29 Thread Marcone via Digitalmars-d-learn
On Wednesday, 25 December 2019 at 13:07:44 UTC, mipri wrote: On Wednesday, 25 December 2019 at 12:39:08 UTC, BoQsc wrote: Are there any other ways to join two strings without Tilde ~ character? I can't seems to find anything about Tilde character concatenation easily, nor the alternatives to it

How can I use a file that is inside resource .res?

2019-12-28 Thread Marcone via Digitalmars-d-learn
I created a file called "resource.rc" with this content: 1 ICON icon.ico 2 EXE app.exe And compiled with this command: windres.exe resource.rc resource.res And I binf it to my program with this command: dmd Program.d resource.res Now I have a Program.exe with "app.exe" inside. Now the file

Re: How create a function that receive a function and run it in another threading?

2019-12-27 Thread Marcone via Digitalmars-d-learn
On Friday, 27 December 2019 at 07:06:52 UTC, mipri wrote: On Friday, 27 December 2019 at 06:08:16 UTC, Marcone wrote: import std; import core.thread; auto threading(lazy void fun){ return task!fun().executeInNewThread(); } void main(){ threading(writeln("Hello World!")); } I want t

How create a function that receive a function and run it in another threading?

2019-12-26 Thread Marcone via Digitalmars-d-learn
import std; import core.thread; auto threading(lazy void fun){ return task!fun().executeInNewThread(); } void main(){ threading(writeln("Hello World!")); } I want to create a function threading() to run some function in other threading, but I get this error bellow. How can I get su

Re: What kind of Editor, IDE you are using and which one do you like for D language?

2019-12-24 Thread Marcone via Digitalmars-d-learn
On Sunday, 22 December 2019 at 17:20:51 UTC, BoQsc wrote: There are lots of editors/IDE's that support D language: https://wiki.dlang.org/Editors What kind of editor/IDE are you using and which one do you like the most? I am using "Sublime Text" for code Dlang.

Re: How use Resedit Dialogs + Dlang?

2019-12-15 Thread Marcone via Digitalmars-d-learn
On Sunday, 15 December 2019 at 13:19:21 UTC, JN wrote: On Sunday, 15 December 2019 at 04:00:14 UTC, Marcone wrote: There's a way to create simple GUI for Dlang using Resedit? How? Do you know how to do it with C++? It should work the same in D, just use the WinApi bindings for calls. No. I

How use Resedit Dialogs + Dlang?

2019-12-14 Thread Marcone via Digitalmars-d-learn
There's a way to create simple GUI for Dlang using Resedit? How?

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exemple code of spec. Or is is possible add version file by d

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 09:48:11 UTC, ShadoLight wrote: On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: [...] To add to Rumbo's comment: to compile a *.rc to *.res file you will need a resource compiler. [...] Hi, I compile resource using windres.exe of MinGW, Can you s

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the ex

How Use/Load/Recovery Files in resource.res files?

2019-12-08 Thread Marcone via Digitalmars-d-learn
I have added files inside resource.res. The icon.ico is automated used for exe program icon. But I don't know how use others files inside resource res. How Use/Load/Recovery Files in resource.res files?

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-08 Thread Marcone via Digitalmars-d-learn
On Sunday, 8 December 2019 at 20:56:05 UTC, mipri wrote: On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exem

How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-08 Thread Marcone via Digitalmars-d-learn
I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exemple code of spec. Or is is possible add version file by dmd command line or resources. Thank you.

Re: How to invert bool false/true in alias compose?

2019-12-06 Thread Marcone via Digitalmars-d-learn
On Saturday, 7 December 2019 at 04:05:23 UTC, mipri wrote: On Saturday, 7 December 2019 at 04:00:53 UTC, Marcone wrote: import std; alias cmd = compose!(to!bool, wait, spawnShell, to!string); void main(){ writeln(cmd("where notepad.exe")); } Result: C:\Windows\System32\notepad.exe C

How to invert bool false/true in alias compose?

2019-12-06 Thread Marcone via Digitalmars-d-learn
import std; alias cmd = compose!(to!bool, wait, spawnShell, to!string); void main(){ writeln(cmd("where notepad.exe")); } Result: C:\Windows\System32\notepad.exe C:\Windows\notepad.exe false The result show "false" because good spawnshell command return 0 and 0 to bool is false. Bu

Slice/Substr [0..?lastIndexOf(".")] How refer itself without create a variable?

2019-12-05 Thread Marcone via Digitalmars-d-learn
Simple example: writeln("Hi\nHow are you?\nGood".splitLines()[0][0..?lastIndexOf(r"\")]); How to refer to this string in lastIndexOf() without create a variable? Thank you.

How bundles a Dlang application and all its dependencies into a single .exe package?

2019-12-01 Thread Marcone via Digitalmars-d-learn
My program have Qt5 GUI that use dlls, icons, pictures, etc. How bundles a Dlang application and all its dependencies into a single .exe package?

Dlang + QtE5 + "Qt Designer": How convert .ui to .d Grafic Interface?

2019-11-14 Thread Marcone via Digitalmars-d-learn
Hi, I use Dlang with QtE5 to make my programs with GUI. I want to design my program with "Qt Designer" and convert .ui file to .d file for use with Dlang + QtE5. In Python, Ruby, C++ you can designe GUI using "Qt Designer" and convert to respective language using uic.exe. I found this duic

Re: Alias sleep(int) for Thread.sleep(dur!("seconds")( int ));

2019-11-12 Thread Marcone via Digitalmars-d-learn
On Tuesday, 12 November 2019 at 22:26:48 UTC, Daniel Kozak wrote: On Tuesday, 12 November 2019 at 21:24:54 UTC, Marcone wrote: I am using this function to sleep, but I want a simple Alias. How can I alias this? // Function sleep(int) void sleep(int seconds){ Thread.sleep(dur!("seconds"

Re: Alias sleep(int) for Thread.sleep(dur!("seconds")( int ));

2019-11-12 Thread Marcone via Digitalmars-d-learn
On Tuesday, 12 November 2019 at 22:26:48 UTC, Daniel Kozak wrote: On Tuesday, 12 November 2019 at 21:24:54 UTC, Marcone wrote: I am using this function to sleep, but I want a simple Alias. How can I alias this? // Function sleep(int) void sleep(int seconds){ Thread.sleep(dur!("seconds"

Alias sleep(int) for Thread.sleep(dur!("seconds")( int ));

2019-11-12 Thread Marcone via Digitalmars-d-learn
I am using this function to sleep, but I want a simple Alias. How can I alias this? // Function sleep(int) void sleep(int seconds){ Thread.sleep(dur!("seconds")( seconds )); } sleep(1); // Using function.

I need "duic.cpp" already compiled for .exe for convert .ui files to .d for Dlang

2019-11-08 Thread Marcone via Digitalmars-d-learn
Hi, I'm at the beginning of Dlang studies. I want to create a graphical interface for my program. I use Qt Designer to draw the GUI and save to .ui file. Could someone send me the file "duic.exe" which converts .ui files into .d for Dlang? I need the "duic.cpp" already compiled for .exe. I alre

Re: How decode encoded Base64 to string text?

2019-11-08 Thread Marcone via Digitalmars-d-learn
On Friday, 8 November 2019 at 12:36:37 UTC, Aldo wrote: On Friday, 8 November 2019 at 11:46:44 UTC, Marcone wrote: I can encode "Helo World!" to Base64 and get "TWFyY29uZQ==", but if I try to decode "TWFyY29uZQ==" I can not recovery "Helo World!" but [77, 97, 114, 99, 111, 110, 101]. How can I

How decode encoded Base64 to string text?

2019-11-08 Thread Marcone via Digitalmars-d-learn
I can encode "Helo World!" to Base64 and get "TWFyY29uZQ==", but if I try to decode "TWFyY29uZQ==" I can not recovery "Helo World!" but [77, 97, 114, 99, 111, 110, 101]. How can I recover "Helo World!" when decode? Thank you. import std; void main(){ string text = "Helo World!";

<    1   2   3