Use Substr() in cpdf_syntax_parser.cpp

Avoids pointer arithmetic in constructing a substring.

Change-Id: I717cf9bd1eec8ec6e79d9767e1378d554e0e8173
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96970
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 01210b9..ad1880d 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -588,8 +588,7 @@
 
       // `key` has to be "/X" at the minimum.
       if (key.GetLength() > 1) {
-        ByteString key_no_slash(key.raw_str() + 1, key.GetLength() - 1);
-        pDict->SetFor(key_no_slash, std::move(pObj));
+        pDict->SetFor(key.Substr(1), std::move(pObj));
       }
     }