// Copyright 2015 The Shaderc Authors. All rights reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314#include "file.h"1516namespace glslc {1718shaderc_util::string_piece GetFileExtension(19const shaderc_util::string_piece& filename) {20size_t dot_pos = filename.find_last_of(".");21if (dot_pos == shaderc_util::string_piece::npos) return "";22return filename.substr(dot_pos + 1);23}2425} // namespace glslc262728