Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StringUtil stringUtil = (*stringUtilImpl)(nil)
Functions ¶
func BinarySearch ¶
BinarySearch 使用二进制搜索算法在指定长度的数组中搜索指定的值,在进行此方法调用之前,须对数组进行排序(通过sort)方法, 如果未进行排序,则结果未定义。如果数组中包含多个具有指定值的元素,则无法保证会找到那一个元素所在的位置 如果未找到元素那么此结果必定小于0 comparse方法需手动编写, string中存在默认的方法 strings.Comparse 此方法返回一个由开发者指定比较的顺序整数 如 a == b return 0 a < b return -1 a > b return +1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.