src/hotspot/share/utilities/stringUtils.hpp
changeset 49163 580bb0b85f63
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
equal deleted inserted replaced
49162:c200b4700aeb 49163:580bb0b85f63
     1 /*
     1 /*
     2  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    35   // Replacement is done in a single pass left-to-right. So replace_no_expand("aaa", "aa", "a")
    35   // Replacement is done in a single pass left-to-right. So replace_no_expand("aaa", "aa", "a")
    36   // will result in "aa", not "a".
    36   // will result in "aa", not "a".
    37   //
    37   //
    38   // Returns the count of substrings that have been replaced.
    38   // Returns the count of substrings that have been replaced.
    39   static int replace_no_expand(char* string, const char* from, const char* to);
    39   static int replace_no_expand(char* string, const char* from, const char* to);
       
    40 
       
    41   // Compute string similarity based on Dice's coefficient
       
    42   static double similarity(const char* str1, size_t len1, const char* str2, size_t len2);
    40 };
    43 };
    41 
    44 
    42 #endif // SHARE_VM_UTILITIES_STRINGUTILS_HPP
    45 #endif // SHARE_VM_UTILITIES_STRINGUTILS_HPP