Difference between revisions of "To class"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
m
imported>Eliteofdelete
(Updated)
Line 7: Line 7:
  
 
function1={{Function|
 
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|int|convert}}|
 +
}}|
 +
 +
function2={{Function|
 
name={{#var:name}}|
 
name={{#var:name}}|
 
aggregate={{#var:aggregate}}|
 
aggregate={{#var:aggregate}}|
Line 12: Line 20:
 
return_also={{#var:return_also}}|
 
return_also={{#var:return_also}}|
 
parameter1={{Param|string|name}}|
 
parameter1={{Param|string|name}}|
p1desc={{Pspan|name}} is the class name to convert|
+
p1desc={{Pspan|name}} is the class int or name to convert|
 
}}|
 
}}|
  

Revision as of 10:40, 26 January 2015

needs(code_samples);

Function Syntax

class to_class(int convert )

class to_class(string name )

  • name is the class int or name to convert

Returns the specified class name as a class.

Special

Unlike direct casting with $class[ ], this function is case-insensitive. Full name is still required (partial names, or names with extra characters, return $class[ none ]).