/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author yonik
* @version $Id$
*/
public class CharUtil {
// belongs in number utils or charutil?
long x = 0;
// If constructing the largest negative number, this will overflow
// to the largest negative number. This is OK since the negation of
// the largest negative number is itself in two's complement.
}
// could replace conditional-move with multiplication of sign... not sure
// which is faster.
return negative ? -x : x;
}
while (--len>=0) {
if (c!=0) return c;
}
}
}