Re: Help with javascript



first parse that string to int by using var int=parseInt(string); then
use math.round(int); thats it

.



Relevant Pages

  • (patch for Bash) regex conditional tests
    ... 'regex' are returned in array variable SUBMATCH. ... Skipping of positional parameters, array elements, string ... int dollarflag, zeropad, compareflag; ... SHELL_VAR *var; ...
    (comp.unix.shell)
  • Re: check to see if value can be an integer instead of string
    ... > have looked at is int, but what is comming out is a string that may ... The "int" builtin function never returns any value but an integer. ... > var = some var passed to my script ...
    (comp.lang.python)
  • Re: Exception handling suggestions
    ... And as far as int parsing try something like this ... /// Safely casts a string as integer. ... public static int intFromString(string var) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Validation
    ... Yes - A bit awkward to use try/catch for regular logic flow but thats the way ... > block to determine if it is an int. ... Also, it returns a string already, so there is no need ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: check to see if value can be an integer instead of string
    ... int(value) returns an int, not a string. ... > var = some var passed to my script ... Prev by Date: ...
    (comp.lang.python)