tools svg2tvg: improve the usability.
authorHermet Park <chuneon.park@samsung.com>
Wed, 27 Oct 2021 10:25:43 +0000 (19:25 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 28 Oct 2021 06:19:31 +0000 (15:19 +0900)
Removed the .svg in the output name.

Before: tiger.svg -> tiger.svg.tvg
After:  tiger.svg -> tiger.tvg

src/bin/svg2tvg/svg2tvg.cpp

index 1285d67..79ba653 100644 (file)
@@ -84,7 +84,7 @@ int main(int argc, char **argv)
 
     //Get tvg file.
     auto tvgName = svgName.substr(svgName.find_last_of("/\\") + 1);
-    tvgName.append(".tvg");
+    tvgName.replace(tvgName.length() - 3, 3, "tvg");
 
     //Convert!
     if (convert(svgName, tvgName)) {