class intSource
Constants 3
protected const int ZERO_PAD_SIZE = 8Referenced by ToStringLen()
const int MAX = 2147483647const int MIN = -2147483648Members 1
protected static string m_ZeroPad[ZERO_PAD_SIZE] = {"", "0", "00", "000", "0000", "00000", "000000", "0000000"}Referenced by ToStringLen()
Methods 5
proto string ToString()proto string AsciiToString()Converts ASCII code to string
ascii- ASCII code for convert to
string.
Returns: string - Converted int.
int ascii_code = 77;
string str = ascii_code.AsciiToString();
Print(str);
>> str = 'M'Integer to string with fixed length, padded with zeroes
numintinteger to convertlenintfixed length
Returns: vector Converted s as vector
int num = 123;
string s = num.ToStringLen(5);
Print(s);
>> s = '00123'Referenced by AutoTestFixture.SaveXMLReport(), Debug.GetDate(), GardenBase.GetSlotPosition()
Show 10 more
, GardenBase.RemoveSlot(), GardenBase.SetSlotTextureDigged(), GardenBase.SetSlotTextureFertilized(), GardenBase.UpdateSlotTexture(), MapNavigationBehaviour.OrderedAltitudeNumbersPosition(), MapNavigationBehaviour.OrderedPositionNumbersFromGridCoords(), PlantBase.UpdatePlant(), PluginConfigViewer.GetConfigRecursive(), UIPopupScriptSceneManager.UpdateSliderStartTime(), and UIPopupScriptSceneSettings.UpdateSliderStartTime()proto string ToHex()Integer to hex (as string)
Returns: string Converted integer as hexadecimal value
int num = 10;
string s = num.ToHex();
Print(s);
>> s = '0xA'Check whether integer falls into an inclusive range
minintlow end of rangemaxinthigh end of range
Returns: bool True if this value is withing the set range
int num = 123;
bool test = num.InRange( 100, 150 );
Print(test);
>> s = trueReferenced by HandsContainer.SetFocusToIndex()