Vuo  2.3.2
VuoTextCase.c
Go to the documentation of this file.
1 
10 #include <string.h>
11 #include "type.h"
12 
14 #ifdef VUO_COMPILER
16  "title" : "Text Case",
17  "description" : "Describes text casing styles.",
18  "keywords" : [ ],
19  "version" : "1.0.0",
20  "dependencies" : [
21  "VuoList_VuoTextCase"
22  ]
23  });
24 #endif
26 
32 {
33  const char *valueAsString = "";
34 
35  if (json_object_get_type(js) == json_type_string)
36  valueAsString = json_object_get_string(js);
37 
38  if( strcmp(valueAsString, "lower") == 0 )
40  else if( strcmp(valueAsString, "upper") == 0 )
42  else if( strcmp(valueAsString, "word") == 0 )
44 
46 }
47 
53 {
54  char *valueAsString = "sentence";
55 
56  if( value == VuoTextCase_LowercaseAll )
57  valueAsString = "lower";
58  else if( value == VuoTextCase_UppercaseAll )
59  valueAsString = "upper";
60  else if( value == VuoTextCase_UppercaseFirstLetterWord )
61  valueAsString = "word";
62 
63  return json_object_new_string(valueAsString);
64 }
65 
70 {
76  return l;
77 }
78 
84 {
85  char *valueAsString = "Uppercase first letter of each sentence";
86 
87  if( value == VuoTextCase_LowercaseAll )
88  valueAsString = "Lowercase all";
89  else if( value == VuoTextCase_UppercaseAll )
90  valueAsString = "Uppercase all";
91  else if( value == VuoTextCase_UppercaseFirstLetterWord )
92  valueAsString = "Uppercase first letter of each word";
93 
94  return strdup(valueAsString);
95 }