-
ToIntDefC++ Builder/함수 2018. 12. 6. 22:16
#ToIntDef
//문자열로 된 숫자를 정수형(Int)로 반환 (오류시 기본값 반환)
System.UnicodeString.ToIntDef
C++
int ToIntDef(int defaultValue) const;
Properties
Type
Visibility
Source
Unit
Parent
function
public
ustring.h
Description
Converts string to integer, returning a default value if the string is invalid.
ToIntDef converts the given string to an integer value and returns the integer. If the string does not contain a valid value, the value given by defaultValue is returned.
ex) {
UnicodeString TestString = "12s3";
ShowMessage(TestString.ToIntDef(2));
}
728x90'C++ Builder > 함수' 카테고리의 다른 글
ShowMessageCenter (0) 2018.12.06 foam (0) 2018.12.06 ToInt (0) 2018.12.06 UpperCase (0) 2018.12.06 LowerCase (0) 2018.12.06 댓글