PY-79967 Introduce a separate method in PyStringLiteralUtil for t-strings

(cherry picked from commit 47b1a84c4331aa127a17e4f934c4b1dc28396cf0)

GitOrigin-RevId: 204f5ba41aa022b672e2d71db83b5bd3327770d4
This commit is contained in:
Daniil Kalinin
2025-04-14 16:07:58 +02:00
committed by intellij-monorepo-bot
parent f1be127202
commit 328d4cc4e1
2 changed files with 15 additions and 1 deletions

View File

@@ -99,7 +99,14 @@ public final class PyStringLiteralUtil extends PyStringLiteralCoreUtil {
* @return whether the given prefix contains either 'f' or 'F' character
*/
public static boolean isFormattedPrefix(@NotNull String prefix) {
return StringUtil.indexOfIgnoreCase(prefix, 'f', 0) >= 0 | StringUtil.indexOfIgnoreCase(prefix, 't', 0) >= 0;
return StringUtil.indexOfIgnoreCase(prefix, 'f', 0) >= 0;
}
/**
* @return whether the given prefix contains either 't' or 'T' character
*/
public static boolean isTemplatePrefix(@NotNull String prefix) {
return StringUtil.indexOfIgnoreCase(prefix, 't', 0) >= 0;
}
/**