17ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes/* 27ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * Copyright (C) 2015 The Android Open Source Project 37ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * 47ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * Licensed under the Apache License, Version 2.0 (the "License"); 57ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * you may not use this file except in compliance with the License. 67ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * You may obtain a copy of the License at 77ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * 87ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * http://www.apache.org/licenses/LICENSE-2.0 97ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * 107ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * Unless required by applicable law or agreed to in writing, software 117ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * distributed under the License is distributed on an "AS IS" BASIS, 127ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * See the License for the specific language governing permissions and 147ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes * limitations under the License. 157ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes */ 167ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes 177ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughesextern "C" const char* strchrnul(const char* s, int ch) { 187ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes while (*s && *s != ch) { 197ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes ++s; 207ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes } 217ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes return s; 227ac3c128bb5df83cb001cb50b6a5ee4da9a0b0e0Elliott Hughes} 23