This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Create pagebreaks in exported Obsidian PDFs. | |
Example: | |
# Heading 1 | |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. | |
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, | |
when an unknown printer took a galley of type and scrambled it to make a type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string HiraganaToKatakana(string input) | |
{ | |
byte[] unicodes = Encoding.GetEncoding("Unicode").GetBytes(input); | |
int i; | |
for (i = 0; i < unicodes.Length; i += 2) //Each 16 bits. | |
{ | |
int _word = (unicodes[i + 1] << 8) | (unicodes[i] & 0xFF); //Two byte make a word. | |
if (_word >= 0x3041 && _word <= 0x30A0) //In hiragana area? | |
{ | |
_word += 0x60; //Add difference. |