mirror of
https://github.com/tonytins/cstdotnet.git
synced 2025-07-04 13:46:54 -04:00
Relicensed under BSD 3-clause
This commit is contained in:
parent
402f5e624c
commit
dc62584b7c
3 changed files with 70 additions and 36 deletions
|
@ -10,24 +10,33 @@
|
|||
"\n",
|
||||
"## CST.NET\n",
|
||||
"\n",
|
||||
"CST.NET uses .NET's built-in indexing extension function to accomplish locating of each respective key. As a consequence, it does not matter what you use for keys. I added an additional normalizion to the pipeline that converts the document's line endings to the system's, in order to prevent crashes."
|
||||
"CST.NET uses .NET's built-in indexing extension function to accomplish locating of each respective key. As a consequence, it does not matter what you use for keys. I added an additional normalization to the pipeline that converts the document's line endings to the system's, in order to prevent crashes."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "csharp"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"using System.IO;\n",
|
||||
"using System.Collections.Generic;\n",
|
||||
"using System.Text.RegularExpressions;"
|
||||
],
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "csharp"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"public static class CaretSeparatedText\n",
|
||||
"{\n",
|
||||
|
@ -114,13 +123,17 @@
|
|||
" return \"***MISSING***\";\n",
|
||||
" }\n",
|
||||
"}"
|
||||
],
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "csharp"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class ContentStrings\n",
|
||||
"{\n",
|
||||
|
@ -161,13 +174,17 @@
|
|||
" return CaretSeparatedText.Parse(file, key);\n",
|
||||
" }\n",
|
||||
"}"
|
||||
],
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "csharp"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"var english = new ContentStrings();\n",
|
||||
"var v1Path = Path.Combine(Environment.CurrentDirectory, \"data\", \"v1.cst\");\n",
|
||||
|
@ -178,13 +195,17 @@
|
|||
"Console.WriteLine($\"One:{Environment.NewLine}{one}\");\n",
|
||||
"/*Console.WriteLine($\"Three:{Environment.NewLine}{three}\");\n",
|
||||
"Console.WriteLine($\"Four:{Environment.NewLine}{four}\"); */"
|
||||
],
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "csharp"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"var v2Path = Path.Combine(Environment.CurrentDirectory, \"data\", \"v2.cst\");\n",
|
||||
"var v2File = File.ReadAllText(v2Path);\n",
|
||||
|
@ -192,8 +213,7 @@
|
|||
"var multiLineV2 = CaretSeparatedText.Parse(v2File, \"Multiline\");\n",
|
||||
"Console.WriteLine($\"Single line v2:{Environment.NewLine}{singleLineV2}\");\n",
|
||||
"Console.WriteLine($\"Multiline v2:{Environment.NewLine}{multiLineV2}\");"
|
||||
],
|
||||
"outputs": []
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
@ -212,4 +232,4 @@
|
|||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue