mathtod.online is part of the decentralized social network powered by Mastodon.
Mathtodon is a Mastodon instance, where you can post toots with beautiful mathematical formulae in TeX/LaTeX style.

Server stats:

77
active users

Learn more

PowerShellというか.NETで文字列を**右から**n桁ずつ区切る簡単な方法ないかなぁ。
たとえば4桁区切りっていう指定があったら,
xxxxxxxxxxxxxx → xx xxxx xxxx xxxx
みたいな変換。
いかにもCS学習の例題とかで出されそうな雰囲気の仕様だから,とうぜんPowerShellでもできるだろうと思ってたけど,簡単な方法なさげ……。
思い付いている方法は,
文字列の長さを取得して,それをnで割ったあまりで文字列の最初を切り出して,あとは
xxxxx -split '(.{n})'
すれば良いんだけど,超ダサい実装になる。