blob: 81143346e6729362bf72da7d1f5bef7e1c4d881d [file] [log] [blame] [edit]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/lib/fxl/strings/string_number_conversions.h"
#include "src/lib/fxl/strings/string_view.h"
int main(int argc, const char* argv[]) {
if (argc < 2) {
return -1;
}
const char* arg = argv[1];
int number;
if (!fxl::StringToNumberWithError<int>(fxl::StringView(arg), &number)) {
return -1;
}
return number;
}