mirror of
https://github.com/tonytins/cstdotnet.git
synced 2025-10-15 16:03:49 -04:00
Proper unit tests
- Changed example section to usage and explained how it was used in TSO
This commit is contained in:
parent
8b5206ad3a
commit
154065d386
7 changed files with 74 additions and 19 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
Caret-Separated Text (or CST) is a key-value pair format represented by numbers or words as keys and the value is the string enclosed between carets (^) that contains the contents. CST.NET is a library for parsing the CST format.
|
||||
|
||||
## Example
|
||||
## Usage
|
||||
|
||||
```csharp
|
||||
using System;
|
||||
|
@ -17,6 +17,13 @@ var example = CaretSeparatedText.Parse(file, 1);
|
|||
Console.WriteLine(example);
|
||||
```
|
||||
|
||||
In production, CST files were used in The Sims Online to provide translations. Each translation was split into their respective directories:
|
||||
|
||||
- ``en/hints/toolbar.cst``
|
||||
- ``sv/hints/toolbar.cst``
|
||||
|
||||
As long as the key remained the same, it didn't matter what directory the file was located in.
|
||||
|
||||
## To-do
|
||||
|
||||
- [ ] Support for arguments (e.g. ``%1``)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue