Please don't switch behaviours via flags: separate names and
implementations are much clearer and much simpler to follow.
Yes, you will have multiple variations, but that's fine.
It is depends of preferences.
In my opinion, create new function for every possible situation is more worse
then use flags.
str.startswith(prefix[, start[, end]]) -> bool
public bool StartsWith (string value, bool ignoreCase,
public bool StartsWith (string value, StringComparison comparisonType);
fun String.startsWith(prefix: String, startIndex: Int = 0, ignoreCase: Boolean =
startsWith(str, pattern, trim=FALSE, ignore.case=FALSE)
startsWith[B](that: GenSeq[B], offset: Int): Boolean
Golang, java, C++, Ruby, Swift have simples syntax, like
C#, Kotlin, R uses flag for ignore case.
Anyway, I can't find language from various TOP-lists where present separate
function for case insensitive operations.
Another note - I see that many languages provide “start_index” parameter for
So… As I say - this is good rfc in perspective, but more discussion is needed.