From f824882043a3350f33b01410a0f8de8eb5daeff1 Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Sat, 21 Jun 2025 18:00:18 +0200 Subject: [PATCH] Add helper to check whether a line starts with a line time tag --- LrcParser/Parser/Lrc/Utils/LrcStartTimeUtils.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LrcParser/Parser/Lrc/Utils/LrcStartTimeUtils.cs b/LrcParser/Parser/Lrc/Utils/LrcStartTimeUtils.cs index 5960f17..b55a4d8 100644 --- a/LrcParser/Parser/Lrc/Utils/LrcStartTimeUtils.cs +++ b/LrcParser/Parser/Lrc/Utils/LrcStartTimeUtils.cs @@ -8,6 +8,19 @@ namespace LrcParser.Parser.Lrc.Utils; public static class LrcStartTimeUtils { + /// + /// Check if the line starts with a line time tag. + /// + /// The lyrics line in the LRC format. + /// + /// true if the line starts with a line time tag, false otherwise. + /// + public static bool StartsWithLineTimeTag(string line) + { + var match = TimeTagUtils.LINE_TIME_TAG_REGEX.Match(line); + return match.Success && match.Index == 0; + } + /// /// Split an LRC lyrics line into parsed line time tags and the lyric text. ///