Dave's Brain

Browse - Programming Tips - How can I check if a recurrence is empty?

Date: 2010apr15
Library: libical
Language: C/C++

Q.  How can I check if a recurrence is empty?

A.  Here is the missing function:

bool icalrecur_is_null_recurrence(struct icalrecurrencetype subject) { struct icalrecurrencetype clear; icalrecurrencetype_clear(&clear); return memcmp(&clear, &subject, sizeof(struct icalrecurrencetype)) == 0; }

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.