[wasm] Use StringRef::trim (NFC)

GitOrigin-RevId: 4972a19702a00ce0a66d66d38b982c706a008ec8
diff --git a/wasm/InputFiles.cpp b/wasm/InputFiles.cpp
index 96ac1e1..5709a5c 100644
--- a/wasm/InputFiles.cpp
+++ b/wasm/InputFiles.cpp
@@ -680,16 +680,7 @@
   llvm_unreachable("unknown symbol kind");
 }
 
-
-StringRef strip(StringRef s) {
-  while (s.starts_with(" ")) {
-    s = s.drop_front();
-  }
-  while (s.ends_with(" ")) {
-    s = s.drop_back();
-  }
-  return s;
-}
+StringRef strip(StringRef s) { return s.trim(' '); }
 
 void StubFile::parse() {
   bool first = true;