Easier way to concat ASCII and Unicode chars in strings
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
I hope VB.NET add a shorter way to concat ascii and Unicode chars in strings
```
Dim S = $"a{ChrW(&H304) + ChrW(&H308)}bc{ChrW (&H327)}"
Console.WriteLine(S) ' ā̈bç
```
This is how it is written in C#:
```
string S = "a\u0304\u0308bc\u0327";
Console.WriteLine(S); // ā̈bç
```
Suggestions:
```
1- Dim S = "a&&H304&&H308bc&&H327"
2- Dim S = $$"a&H304&H308bc&H327"
3- Dim S = @"a\u0304\u0308bc\u0327"
4- Dim S = $"a{\W\h0304\W\h0308}bc{\W\H0327}"
5- Dim S = $"a{\u0304\u0308}bc{\u0327}"
```
I prefere 3, because @ alows us to include \ eacape char for other usages without breaking any existing strings. We can use it with ascii like this:
`Dim S = @"ab\012\009cd"`
I also prefer 5, where \u is a shortcut for \w\h.
I also wish to write chars in ASCII and Unicode Directly like this:
```
Dim c1 = "16"a ' c1 = Asc(16)
Dim c2 = "280"u ' c2 = AscW(280)
Dim x = {"a"c, "304"u, "308"u, "b"c, "c"c, "327"u}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.