ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/util/StringUtil.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/util/StringUtil.java
Status
scanned
Type
file
Name
StringUtil.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
1590 (1.6 KB)
MD5
792cbfc3af9a9de784be29fd14758220
SHA1
099f5905994fad8507c7b805a13228cb9e9e4bdc
SHA256
2c00483e53c5c02aad5425094e0d71c8476d3588d17ad0cd2c3a8878f84b5078
SHA512

      
    
SHA1_git
9f29adcb0b22ff58d968de25f493b56f868da9f3
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
StringUtil.java | 1.6 KB |

/* * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * 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. */ package org.apache.catalina.util; import java.util.regex.Pattern; public class StringUtil { /** * {@link Pattern} for a comma delimited string that support whitespace characters */ private static final Pattern commaSeparatedValuesPattern = Pattern.compile("\\s*,\\s*"); /** * Splits a comma-separated string into an array of String values. Whitespace around the commas is removed. Null or * empty values will return a zero-element array. * * @param s The string to split by commas. * * @return An array of String values. */ public static String[] splitCommaSeparated(String s) { return (s == null || s.isEmpty()) ? new String[0] : commaSeparatedValuesPattern.split(s); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
58.33
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9