]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
Support prameters expansion in auto install script.
[Ventoy.git] / GRUB2 / MOD_SRC / grub-2.04 / grub-core / ventoy / ventoy.c
index 2f1faa3413f77fb250d8f8a249e2ff5707df8334..00ebba5253a2ae442e32f3d61a6b9e1a8c73e002 100644 (file)
@@ -76,7 +76,26 @@ void ventoy_str_toupper(char *str)
     }
 }
 
+char *ventoy_str_last(char *str, char ch)
+{
+    char *pos = NULL;
+    char *last = NULL;
+
+    if (!str)
+    {
+        return NULL;
+    }
 
+    for (pos = str; *pos; pos++)
+    {
+        if (*pos == ch)
+        {
+            last = pos;
+        }
+    }
+
+    return last;
+}
 
 int ventoy_strcmp(const char *pattern, const char *str)
 {