-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some string functions #278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大きな修正は必要ないと思います(containsの実装だけ後でちゃんと確認します)
あとこれは前提の確認なのですが、このあたりの関数はどのような基準で追加しましたか?(外部のライブラリを参考にした or 自分が使って欲しいものを追加した あたりでしょうか)
__test__/satysrc/generic.saty
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
テスト追加ありがとうございます!
指摘ありがとうございます。後で確認して修正します。 |
なるほど、それで ascii に限定した実装になっているんですね(unicodeへの対応は確かに面倒くさそうだ…) |
あと2つコメントが残っているので見てもらってもいいですか?よろしくお願いします。 |
よいと思います、ありがとうございます 🙏 |
追加した関数は以下の通りです:
with-concat : string -> string list -> string
:区切り文字を指定した文字リスト結合cat : string -> string -> string
:文字結合make : int -> Char.t -> string
:文字列生成init : int -> (int -> Char.t) -> string
:文字列生成get : int -> string -> Char.t option
:位置を指定した文字取得contains : string -> string -> bool
:部分文字列判定trim : string -> string
:空白削除trim-start : string -> string
:空白削除trim-end : string -> string
:空白削除uppercase-ascii : string -> string
:大文字化lowercase-ascii : string -> string
:小文字化capitalize-ascii : string -> string
:先頭の大文字化uncapitalize-ascii : string -> string
:先頭の小文字化